Skip to content

Commit

Permalink
remove commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Jan 10, 2023
1 parent b54bfb9 commit b6896ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 26 deletions.
17 changes: 0 additions & 17 deletions internal/provider/resource_cloudflare_pages_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,6 @@ func buildDeploymentConfig(environment interface{}) cloudflare.PagesProjectDeplo
}

break
//case "secret":
// for _, variable := range value.(*schema.Set).List() {
// data := variable.(map[string]interface{})
// envVar := cloudflare.EnvironmentVariable{
// Value: data["text"].(string),
// Type: cloudflare.SecretText,
// }
// deploymentVariables[data["name"].(string)] = &envVar
// }
// break
case "kv_namespaces":
namespace := cloudflare.NamespaceBindingMap{}
variables := value.(map[string]interface{})
Expand Down Expand Up @@ -139,15 +129,8 @@ func parseDeploymentConfig(deployment cloudflare.PagesProjectDeploymentConfigEnv
if value.Type == cloudflare.PlainText {
deploymentVars[key] = value.Value
}
//} else {
// secretsBinding.Add(map[string]interface{}{
// "name": key,
// "text": value.Value,
// })
//}
}
config["environment_variables"] = deploymentVars
//config["secret"] = secretsBinding

deploymentVars = map[string]string{}
for key, value := range deployment.KvNamespaces {
Expand Down
6 changes: 3 additions & 3 deletions internal/provider/resource_cloudflare_pages_project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func testPagesProjectBuildConfig(resourceID, accountID string) string {
web_analytics_tag = "cee1c73f6e4743d0b5e6bb1a0bcaabcc"
web_analytics_token = "021e1057c18547eca7b79f2516f06o7x"
}
%[4]s
%[4]s
}
`, resourceID, accountID, resourceID, testPagesProjectEmptyDeploymentConfig)
}
Expand Down Expand Up @@ -145,13 +145,13 @@ func testPagesProjectDirectUpload(resourceID, accountID string) string {
account_id = "%[2]s"
name = "%[1]s"
production_branch = "main"
%[3]s
%[3]s
}
`, resourceID, accountID, testPagesProjectEmptyDeploymentConfig)
}

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
6 changes: 0 additions & 6 deletions internal/provider/schema_cloudflare_pages_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ func resourceCloudflarePagesProjectSchema() map[string]*schema.Schema {
Description: "Environment variables for Pages Functions.",
Optional: true,
},
//"secret": {
// Type: schema.TypeSet,
// Description: "Secrets for Pages Functions.",
// Optional: true,
// Elem: secretTextBindingResource,
//},
"kv_namespaces": {
Type: schema.TypeMap,
Description: "KV namespaces used for Pages Functions.",
Expand Down

0 comments on commit b6896ce

Please sign in to comment.