Skip to content

Commit

Permalink
Adding support for secrets in all values in DeploymentSettings (#467)
Browse files Browse the repository at this point in the history
### Summary
- Adding support for all values in Deployment Settings to be read in as
secrets
- Cut ticket #468
to implement the same for ALL resources
- Added some folders to .gitignore that were getting created after
.ci-mgmt onboarding
- Added some digits to TemplateSource examples to remove flakiness

### Testing
- Manual test
- Edited integ test to test secret support every time
  • Loading branch information
IaroslavTitov authored Dec 12, 2024
1 parent 4154a6a commit 49003fc
Show file tree
Hide file tree
Showing 9 changed files with 142 additions and 103 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ ci-scripts
.mono
/go/
*.sln
.config/
.gradle/
1 change: 1 addition & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### Improvements
- Added secret support for all fields in DeploymentSettings [#419](https://github.com/pulumi/pulumi-pulumiservice/issues/419)

### Bug Fixes

Expand Down
4 changes: 4 additions & 0 deletions examples/examples_nodejs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@ func TestNodejsEnvironmentsExample(t *testing.T) {

func TestNodejsTemplateSourcesExample(t *testing.T) {
cwd := getCwd(t)
digits := generateRandomFiveDigits()
integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: path.Join(cwd, ".", "ts-template-source"),
Config: map[string]string{
"digits": digits,
},
Dependencies: []string{
"@pulumi/pulumiservice",
},
Expand Down
4 changes: 4 additions & 0 deletions examples/examples_yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,12 @@ func TestYamlAgentPoolsExample(t *testing.T) {

func TestYamlTemplateSourcesExample(t *testing.T) {
cwd := getCwd(t)
digits := generateRandomFiveDigits()
integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: path.Join(cwd, ".", "yaml-template-sources"),
Config: map[string]string{
"digits": digits,
},
})
}

Expand Down
2 changes: 1 addition & 1 deletion examples/ts-deployment-settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ const settings = new service.DeploymentSettings("deployment_settings", {
}
},
cacheOptions: {
enable: true,
enable: pulumi.secret(true),
}
});
5 changes: 4 additions & 1 deletion examples/ts-template-source/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import * as pulumi from "@pulumi/pulumi";
import * as service from "@pulumi/pulumiservice";

let config = new pulumi.Config();
let digits = config.require("digits");

const source = new service.TemplateSource("source", {
organizationName: "service-provider-test-org",
sourceName: "bootstrap-ts",
sourceName: "bootstrap-"+digits,
sourceURL: "https://github.com/pulumi/pulumi-pulumiservice",
destination: {
url: "https://github.com/pulumi/pulumi-pulumiservice"
Expand Down
2 changes: 1 addition & 1 deletion examples/yaml-template-sources/Pulumi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resources:
type: pulumiservice:index:TemplateSource
properties:
organizationName: service-provider-test-org
sourceName: bootstrap
sourceName: bootstrap-${digits}
sourceURL: "https://github.com/pulumi/pulumi-pulumiservice"
destination:
url: "https://github.com/pulumi/pulumi-pulumiservice"
Loading

0 comments on commit 49003fc

Please sign in to comment.