Skip to content

Commit

Permalink
Update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyb3r-Jak3 committed May 29, 2023
1 parent f48f6fa commit e78a02c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
5 changes: 4 additions & 1 deletion .changelog/2480.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
```release-note:enhacement
```release-note:enhancement
cloudflare_pages_project: add `placement` to deployment config
```
```release-note:bug
cloudflare_pages_project: mark deployment config as computed
```
30 changes: 15 additions & 15 deletions internal/sdkv2provider/resource_cloudflare_pages_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ func buildDeploymentConfig(environment interface{}) cloudflare.PagesProjectDeplo

break
case "secrets":
// variables := value.(map[string]interface{})
// for i, variable := range variables {
// envVar := cloudflare.EnvironmentVariable{
// Value: variable.(string),
// Type: cloudflare.SecretText,
// }
// deploymentVariables[i] = &envVar
// }
variables := value.(map[string]interface{})
for i, variable := range variables {
envVar := cloudflare.EnvironmentVariable{
Value: variable.(string),
Type: cloudflare.SecretText,
}
deploymentVariables[i] = &envVar
}

break
case "kv_namespaces":
Expand Down Expand Up @@ -152,13 +152,13 @@ func parseDeploymentConfig(deployment cloudflare.PagesProjectDeploymentConfigEnv
}
config["environment_variables"] = deploymentVars

//deploymentVars = map[string]string{}
//for key, value := range deployment.EnvVars {
// if value.Type == cloudflare.SecretText {
// deploymentVars[key] = value.Value
// }
//}
//config["secrets"] = deploymentVars
deploymentVars = map[string]string{}
for key, value := range deployment.EnvVars {
if value.Type == cloudflare.SecretText {
deploymentVars[key] = value.Value
}
}
config["secrets"] = deploymentVars

deploymentVars = map[string]string{}
for key, value := range deployment.KvNamespaces {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func testPagesProjectDirectUpload(resourceID, accountID string) string {
}

func TestAccCloudflarePagesProject_Basic(t *testing.T) {
//t.Skip("Skipping Pages acceptance tests pending investigation into automating the setup and teardown")
t.Skip("Skipping Pages acceptance tests pending investigation into automating the setup and teardown")

rnd := generateRandomResourceName()
name := "cloudflare_pages_project." + rnd
Expand Down

0 comments on commit e78a02c

Please sign in to comment.