Skip to content

Commit

Permalink
Fix prop name
Browse files Browse the repository at this point in the history
  • Loading branch information
ned1313 committed Dec 17, 2024
1 parent 1716de3 commit 2f006df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/services/appservice/static_web_app_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (s StaticWebAppDataSource) Read() sdk.ResourceFunc {
state.ConfigFileChanges = pointer.From(props.AllowConfigFileUpdates)
state.DefaultHostName = pointer.From(props.DefaultHostname)
state.PreviewEnvironments = pointer.From(props.StagingEnvironmentPolicy) == staticsites.StagingEnvironmentPolicyEnabled
state.RepositoryUrl = pointer.From(props.RepositoryUrl)
state.RepositoryUrl = pointer.From(props.RepositoryURL)
state.RepositoryBranch = pointer.From(props.Branch)
state.PublicNetworkAccess = !strings.EqualFold(pointer.From(props.PublicNetworkAccess), helpers.PublicNetworkAccessDisabled)
}
Expand Down
6 changes: 3 additions & 3 deletions internal/services/appservice/static_web_app_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (r StaticWebAppResource) Create() sdk.ResourceFunc {
// Check if repository URL, branch, or token are set
if model.RepositoryUrl != "" || model.RepositoryBranch != "" || model.RepositoryToken != "" {
props.Branch = pointer.To(model.RepositoryBranch)
props.RepositoryUrl = pointer.To(model.RepositoryUrl)
props.RepositoryURL = pointer.To(model.RepositoryUrl)
props.RepositoryToken = pointer.To(model.RepositoryToken)
}

Expand Down Expand Up @@ -314,7 +314,7 @@ func (r StaticWebAppResource) Read() sdk.ResourceFunc {
state.DefaultHostName = pointer.From(props.DefaultHostname)
state.PreviewEnvironments = pointer.From(props.StagingEnvironmentPolicy) == staticsites.StagingEnvironmentPolicyEnabled

state.RepositoryUrl = pointer.From(props.RepositoryUrl)
state.RepositoryUrl = pointer.From(props.RepositoryURL)
state.RepositoryBranch = pointer.From(props.Branch)

// Token isn't returned in the response, so we need to grab it from the config
Expand Down Expand Up @@ -499,7 +499,7 @@ func (r StaticWebAppResource) Update() sdk.ResourceFunc {
}

if metadata.ResourceData.HasChanges("repository_url", "repository_branch", "repository_token") {
model.Properties.RepositoryUrl = pointer.To(config.RepositoryUrl)
model.Properties.RepositoryURL = pointer.To(config.RepositoryUrl)
model.Properties.Branch = pointer.To(config.RepositoryBranch)
model.Properties.RepositoryToken = pointer.To(config.RepositoryToken)
}
Expand Down

0 comments on commit 2f006df

Please sign in to comment.