Skip to content

Commit

Permalink
Unsecret tags all (#3471)
Browse files Browse the repository at this point in the history
Stacked on top of #3468.

This PR removes secreting tagsAll in all cases. This will allow users to
leak secret tags.

Fixes #3265
  • Loading branch information
iwahbe authored Feb 27, 2024
1 parent 9a0bcc6 commit 4c1ce0e
Show file tree
Hide file tree
Showing 3,229 changed files with 2,036 additions and 15,458 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 2 additions & 5 deletions examples/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,7 @@ func TestRegressUnknownTags(t *testing.T) {
"revokeRulesOnDelete": true,
"vpcId": "vpc-4b82e033",
"tags": "04da6b54-80e4-46f7-96ec-b56ff0331ba9",
"tagsAll": {
"4dabf18193072939515e22adb298388d": "1b47061264138c4ac30d75fd1eb44270",
"value": "04da6b54-80e4-46f7-96ec-b56ff0331ba9"
}
"tagsAll": "04da6b54-80e4-46f7-96ec-b56ff0331ba9"
}
}
}
Expand Down Expand Up @@ -587,7 +584,7 @@ func TestWrongStateMaxItemOneDiffProduced(t *testing.T) {
}

func TestSourceCodeHashImportedLambdaChecksCleanly(t *testing.T) {
replay(t, `
replay(t, `
[{
"method": "/pulumirpc.ResourceProvider/Check",
"request": {
Expand Down
13 changes: 0 additions & 13 deletions examples/examples_yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"strings"
"testing"

"encoding/json"
"github.com/pulumi/pulumi/pkg/v3/testing/integration"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -372,15 +371,3 @@ outputs:
}
}
}

func TestRegressSecretTags(t *testing.T) {
integration.ProgramTest(t, &integration.ProgramTestOptions{
Dir: "bucket-secret-tags-yaml",
Quick: true,
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
bytes, err := json.Marshal(stack.Deployment)
require.NoError(t, err)
require.NotContainsf(t, string(bytes), "mysecret", "mysecret leaked to state in plain text")
},
})
}
3,852 changes: 1,281 additions & 2,571 deletions provider/cmd/pulumi-resource-aws/schema.json

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -6270,18 +6270,12 @@ $ pulumi import aws:networkfirewall/resourcePolicy:ResourcePolicy example arn:aw
fields["tags_all"] = &tfbridge.SchemaInfo{}
}

fields["tags_all"].Secret = tfbridge.True()
fields["tags_all"].DeprecationMessage = "Please use `tags` instead."

// Upstream provider is edited to unmark tags_all as computed internally so that
// Pulumi provider internals can set it, but the user should not be able to set it.
fields["tags_all"].MarkAsComputedOnly = tfbridge.True()

fields["tags_all"].DeprecationMessage = "Please use `tags` instead."
fields["tags_all"].MarkAsOptional = tfbridge.False()

contract.Assertf(prov.Resources[key].TransformOutputs == nil,
"prov.Resources[key].TransformOutputs==nil")

return true
})

Expand Down
10 changes: 1 addition & 9 deletions sdk/dotnet/AccessAnalyzer/Analyzer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions sdk/dotnet/Acm/Certificate.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions sdk/dotnet/Acmpca/CertificateAuthority.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions sdk/dotnet/Alb/Listener.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions sdk/dotnet/Alb/ListenerRule.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions sdk/dotnet/Alb/LoadBalancer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions sdk/dotnet/Alb/TargetGroup.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions sdk/dotnet/Amp/Scraper.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions sdk/dotnet/Amp/Workspace.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions sdk/dotnet/Amplify/App.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions sdk/dotnet/Amplify/Branch.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions sdk/dotnet/ApiGateway/ApiKey.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions sdk/dotnet/ApiGateway/ClientCertificate.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions sdk/dotnet/ApiGateway/DomainName.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4c1ce0e

Please sign in to comment.