Skip to content

Commit

Permalink
fix: ignore check when URL is unknown (#27)
Browse files Browse the repository at this point in the history
* fix: upgrade atlas version

Signed-off-by: Giau. Tran Minh <[email protected]>

* fix: ignore check when URL is unknown

Signed-off-by: Giau. Tran Minh <[email protected]>

Signed-off-by: Giau. Tran Minh <[email protected]>
  • Loading branch information
giautm authored Oct 17, 2022
1 parent f48b301 commit 15e726a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module ariga.io/ariga/terraform-provider-atlas
go 1.19

require (
ariga.io/atlas v0.7.3-0.20221013121452-b80c5b646522
ariga.io/atlas v0.7.3-0.20221016142659-e585b0fa891c
github.com/go-sql-driver/mysql v1.6.0
github.com/hashicorp/hcl/v2 v2.14.0
github.com/hashicorp/terraform-plugin-docs v0.7.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ariga.io/atlas v0.7.3-0.20221013121452-b80c5b646522 h1:6eQGXz1TSQOIc7RPN11uh06v8eoZXlOOv0tQLt9MjqM=
ariga.io/atlas v0.7.3-0.20221013121452-b80c5b646522/go.mod h1:ft47uSh5hWGDCmQC9DsztZg6Xk+KagM5Ts/mZYKb9JE=
ariga.io/atlas v0.7.3-0.20221016142659-e585b0fa891c h1:IH0GSICKhGo7NnLVxTbCCmvm8SaS9wSsgYR71oR5+00=
ariga.io/atlas v0.7.3-0.20221016142659-e585b0fa891c/go.mod h1:ft47uSh5hWGDCmQC9DsztZg6Xk+KagM5Ts/mZYKb9JE=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
Expand Down
4 changes: 4 additions & 0 deletions internal/provider/atlas_schema_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ func (r *AtlasSchemaResource) ModifyPlan(ctx context.Context, req resource.Modif
return
}
if state == nil || state.HCL.Value == "" {
if plan.URL.IsUnknown() {
resp.RequiresReplace = append(resp.RequiresReplace, path.Root("url"))
return
}
// New terraform resource will be create,
// do the first run check to ensure the user doesn't
// drops schema resources by accident
Expand Down

0 comments on commit 15e726a

Please sign in to comment.