-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade terraform-provider-aws to v5.82.1 #4957
Changes from 5 commits
ec0b225
f07d1cb
42760d0
25e4571
0e4a05e
4ae03c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ package examples | |
import ( | ||
"bytes" | ||
"context" | ||
_ "embed" | ||
"encoding/json" | ||
"fmt" | ||
"os" | ||
|
@@ -13,15 +14,21 @@ import ( | |
|
||
"github.com/pulumi/providertest" | ||
"github.com/pulumi/providertest/optproviderupgrade" | ||
"github.com/pulumi/providertest/providers" | ||
"github.com/pulumi/providertest/pulumitest" | ||
"github.com/pulumi/providertest/pulumitest/assertpreview" | ||
"github.com/pulumi/providertest/pulumitest/optnewstack" | ||
"github.com/pulumi/providertest/pulumitest/opttest" | ||
pfbridge "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/tfbridge" | ||
"github.com/pulumi/pulumi/sdk/v3/go/auto/optpreview" | ||
"github.com/pulumi/pulumi/sdk/v3/go/auto/optup" | ||
"github.com/pulumi/pulumi/sdk/v3/go/common/apitype" | ||
pulumirpc "github.com/pulumi/pulumi/sdk/v3/proto/go" | ||
"github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
|
||
aws "github.com/pulumi/pulumi-aws/provider/v6" | ||
"github.com/pulumi/pulumi-aws/provider/v6/pkg/version" | ||
) | ||
|
||
func TestUpgradeCoverage(t *testing.T) { | ||
|
@@ -317,3 +324,32 @@ func planEqual(t *testing.T, firstPlan, secondPlan string) bool { | |
|
||
return assert.Equal(t, firstPlanData, secondPlanData) | ||
} | ||
|
||
func inPlacePulumiTest(t *testing.T, dir string, opts ...opttest.Option) *pulumitest.PulumiTest { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This allows us now to use an in-process provider for the tests. Which will also give us code coverage :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is good but might want to be careful to not use this for production release verification in case there's accidentally some behavioral difference between the prod binary and this form of running the provider. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, before adopting this for all tests we should add some sort of flag/env variable to fall back to attaching the binary for releases |
||
t.Helper() | ||
if testing.Short() { | ||
t.Skipf("Skipping in testing.Short() mode, assuming this is a CI run without AWS creds") | ||
return nil | ||
} | ||
rpFactory := providers.ResourceProviderFactory(providerServer) | ||
|
||
opts = append(opts, opttest.AttachProvider("aws", rpFactory)) | ||
return pulumitest.NewPulumiTest(t, dir, opts...) | ||
} | ||
|
||
func providerServer(_ providers.PulumiTest) (pulumirpc.ResourceProviderServer, error) { | ||
ctx := context.Background() | ||
// This is necessary for gRPC testing. It doesn't effect integration tests, since | ||
// they use their own binary. | ||
version.Version = "6.0.0" | ||
info := *aws.Provider() | ||
|
||
return pfbridge.MakeMuxedServer(ctx, info.Name, info, | ||
/* | ||
* We leave the schema blank. This will result in incorrect calls to | ||
* GetSchema, but otherwise does not effect the provider. It reduces the | ||
* time to test start by minutes. | ||
*/ | ||
[]byte("{}"), | ||
)(nil) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: elasticache-replication-group | ||
runtime: yaml | ||
config: | ||
pulumi:tags: | ||
value: | ||
pulumi:template: aws-yaml | ||
outputs: | ||
replicationGroupArn: ${replicationGroup.arn} | ||
resources: | ||
replicationGroup: | ||
type: aws:elasticache:ReplicationGroup | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice. |
||
properties: | ||
description: Example Replication Group | ||
atRestEncryptionEnabled: true | ||
nodeType: cache.m4.large | ||
numCacheClusters: 1 | ||
port: 6379 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{"method":"/pulumirpc.LanguageRuntime/GetPluginInfo","request":{},"response":{}} | ||
{"method":"/pulumirpc.LanguageRuntime/GetPluginInfo","request":{},"response":{}} | ||
{"method":"/pulumirpc.LanguageRuntime/GetRequiredPlugins","request":{"info":{"entryPoint":".","options":{},"programDirectory":"/private/var/folders/qb/q9rbqmxn1jqdfps720v2s9h80000gn/T/TestElasticacheReplicationGroupUpgrade2140664671/007/elasticache-replication-group","rootDirectory":"/private/var/folders/qb/q9rbqmxn1jqdfps720v2s9h80000gn/T/TestElasticacheReplicationGroupUpgrade2140664671/007/elasticache-replication-group"},"program":".","project":"deprecated","pwd":"/private/var/folders/qb/q9rbqmxn1jqdfps720v2s9h80000gn/T/TestElasticacheReplicationGroupUpgrade2140664671/007/elasticache-replication-group"},"response":{"plugins":[{"kind":"resource","name":"aws"}]}} | ||
{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"resourceReferences"},"response":{"hasSupport":true}} | ||
{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"outputValues"},"response":{"hasSupport":true}} | ||
{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"deletedWith"},"response":{"hasSupport":true}} | ||
{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"aliasSpecs"},"response":{"hasSupport":true}} | ||
{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"transforms"},"response":{"hasSupport":true}} | ||
{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"invokeTransforms"},"response":{"hasSupport":true}} | ||
{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"acceptResources":true,"acceptSecrets":true,"customTimeouts":{},"name":"elasticache-replication-group-test","object":{},"sourcePosition":{"line":195,"uri":"project://%2Fhome%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fserver%2Fserver.go"},"supportsResultReporting":true,"type":"pulumi:pulumi:Stack"},"response":{"object":{},"urn":"urn:pulumi:test::elasticache-replication-group::pulumi:pulumi:Stack::elasticache-replication-group-test"}} | ||
{"method":"/pulumirpc.ResourceProvider/GetPluginInfo","request":{},"response":{"version":"v5.42.0"}} | ||
{"method":"/pulumirpc.ResourceProvider/CheckConfig","request":{"name":"default","news":{},"olds":{},"type":"pulumi:providers:aws","urn":"urn:pulumi:test::elasticache-replication-group::pulumi:providers:aws::default"},"response":{"inputs":{}}} | ||
{"method":"/pulumirpc.ResourceProvider/Configure","request":{"acceptResources":true,"acceptSecrets":true,"args":{},"sendsOldInputs":true,"sendsOldInputsToDelete":true},"response":{"supportsPreview":true}} | ||
{"method":"/pulumirpc.ResourceProvider/Check","request":{"name":"replicationGroup","news":{"atRestEncryptionEnabled":true,"description":"Example Replication Group","nodeType":"cache.m4.large","numCacheClusters":1,"port":6379},"olds":{},"randomSeed":"fefUMF9ftDGSGZ9YAa9BrUVDMLh99HDFb/J/ql7xRl8=","type":"aws:elasticache/replicationGroup:ReplicationGroup","urn":"urn:pulumi:test::elasticache-replication-group::aws:elasticache/replicationGroup:ReplicationGroup::replicationGroup"},"response":{"inputs":{"__defaults":["automaticFailoverEnabled","engine","multiAzEnabled","replicationGroupId"],"atRestEncryptionEnabled":true,"automaticFailoverEnabled":false,"description":"Example Replication Group","engine":"redis","multiAzEnabled":false,"nodeType":"cache.m4.large","numCacheClusters":1,"port":6379,"replicationGroupId":"replicationgroup-f1113fa"}}} | ||
{"method":"/pulumirpc.ResourceProvider/Create","request":{"name":"replicationGroup","properties":{"__defaults":["automaticFailoverEnabled","engine","multiAzEnabled","replicationGroupId"],"atRestEncryptionEnabled":true,"automaticFailoverEnabled":false,"description":"Example Replication Group","engine":"redis","multiAzEnabled":false,"nodeType":"cache.m4.large","numCacheClusters":1,"port":6379,"replicationGroupId":"replicationgroup-f1113fa"},"type":"aws:elasticache/replicationGroup:ReplicationGroup","urn":"urn:pulumi:test::elasticache-replication-group::aws:elasticache/replicationGroup:ReplicationGroup::replicationGroup"},"response":{"id":"replicationgroup-f1113fa","properties":{"__meta":"{\"e2bfb730-ecaa-11e6-8f88-34363bc7c4c0\":{\"create\":3600000000000,\"delete\":2400000000000,\"update\":2400000000000},\"schema_version\":\"1\"}","arn":"arn:aws:elasticache:us-west-2:616138583583:replicationgroup:replicationgroup-f1113fa","atRestEncryptionEnabled":true,"authToken":{"4dabf18193072939515e22adb298388d":"1b47061264138c4ac30d75fd1eb44270","value":"REDACTED BY PROVIDERTEST"},"autoMinorVersionUpgrade":true,"automaticFailoverEnabled":false,"clusterEnabled":false,"clusterMode":{"numNodeGroups":1,"replicasPerNodeGroup":0},"dataTieringEnabled":false,"description":"Example Replication Group","engine":"redis","engineVersion":"7.1","engineVersionActual":"7.1.0","id":"replicationgroup-f1113fa","kmsKeyId":"","logDeliveryConfigurations":[],"maintenanceWindow":"thu:08:00-thu:09:00","memberClusters":["replicationgroup-f1113fa-001"],"multiAzEnabled":false,"nodeType":"cache.m4.large","numCacheClusters":1,"numNodeGroups":1,"numberCacheClusters":1,"parameterGroupName":"default.redis7","port":6379,"primaryEndpointAddress":"replicationgroup-f1113fa.01fu6p.ng.0001.usw2.cache.amazonaws.com","readerEndpointAddress":"replicationgroup-f1113fa-ro.01fu6p.ng.0001.usw2.cache.amazonaws.com","replicasPerNodeGroup":0,"replicationGroupDescription":"Example Replication Group","replicationGroupId":"replicationgroup-f1113fa","securityGroupIds":[],"securityGroupNames":[],"snapshotRetentionLimit":0,"snapshotWindow":"11:30-12:30","subnetGroupName":"default","tags":{},"tagsAll":{},"transitEncryptionEnabled":false,"userGroupIds":[]}}} | ||
{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"acceptResources":true,"acceptSecrets":true,"additionalSecretOutputs":["authToken"],"custom":true,"customTimeouts":{},"name":"replicationGroup","object":{"atRestEncryptionEnabled":true,"description":"Example Replication Group","nodeType":"cache.m4.large","numCacheClusters":1,"port":6379},"parent":"urn:pulumi:test::elasticache-replication-group::pulumi:pulumi:Stack::elasticache-replication-group-test","propertyDependencies":{"atRestEncryptionEnabled":{},"description":{},"nodeType":{},"numCacheClusters":{},"port":{}},"sourcePosition":{"line":740,"uri":"project://%2Fhome%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go"},"supportsResultReporting":true,"type":"aws:elasticache/replicationGroup:ReplicationGroup"},"response":{"id":"replicationgroup-f1113fa","object":{"__meta":"{\"e2bfb730-ecaa-11e6-8f88-34363bc7c4c0\":{\"create\":3600000000000,\"delete\":2400000000000,\"update\":2400000000000},\"schema_version\":\"1\"}","arn":"arn:aws:elasticache:us-west-2:616138583583:replicationgroup:replicationgroup-f1113fa","atRestEncryptionEnabled":true,"authToken":{"4dabf18193072939515e22adb298388d":"1b47061264138c4ac30d75fd1eb44270","value":"REDACTED BY PROVIDERTEST"},"autoMinorVersionUpgrade":true,"automaticFailoverEnabled":false,"clusterEnabled":false,"clusterMode":{"numNodeGroups":1,"replicasPerNodeGroup":0},"dataTieringEnabled":false,"description":"Example Replication Group","engine":"redis","engineVersion":"7.1","engineVersionActual":"7.1.0","id":"replicationgroup-f1113fa","kmsKeyId":"","logDeliveryConfigurations":[],"maintenanceWindow":"thu:08:00-thu:09:00","memberClusters":["replicationgroup-f1113fa-001"],"multiAzEnabled":false,"nodeType":"cache.m4.large","numCacheClusters":1,"numNodeGroups":1,"numberCacheClusters":1,"parameterGroupName":"default.redis7","port":6379,"primaryEndpointAddress":"replicationgroup-f1113fa.01fu6p.ng.0001.usw2.cache.amazonaws.com","readerEndpointAddress":"replicationgroup-f1113fa-ro.01fu6p.ng.0001.usw2.cache.amazonaws.com","replicasPerNodeGroup":0,"replicationGroupDescription":"Example Replication Group","replicationGroupId":"replicationgroup-f1113fa","securityGroupIds":[],"securityGroupNames":[],"snapshotRetentionLimit":0,"snapshotWindow":"11:30-12:30","subnetGroupName":"default","tags":{},"tagsAll":{},"transitEncryptionEnabled":false,"userGroupIds":[]},"urn":"urn:pulumi:test::elasticache-replication-group::aws:elasticache/replicationGroup:ReplicationGroup::replicationGroup"}} | ||
{"method":"/pulumirpc.ResourceMonitor/RegisterResourceOutputs","request":{"outputs":{"replicationGroupArn":"arn:aws:elasticache:us-west-2:616138583583:replicationgroup:replicationgroup-f1113fa"},"urn":"urn:pulumi:test::elasticache-replication-group::pulumi:pulumi:Stack::elasticache-replication-group-test"},"response":{}} | ||
{"method":"/pulumirpc.LanguageRuntime/Run","request":{"config":{"pulumi:tags":"{\"pulumi:template\":\"aws-yaml\"}"},"configPropertyMap":{"pulumi:tags":{"pulumi:template":"aws-yaml"}},"info":{"entryPoint":".","options":{},"programDirectory":"/private/var/folders/qb/q9rbqmxn1jqdfps720v2s9h80000gn/T/TestElasticacheReplicationGroupUpgrade2140664671/007/elasticache-replication-group","rootDirectory":"/private/var/folders/qb/q9rbqmxn1jqdfps720v2s9h80000gn/T/TestElasticacheReplicationGroupUpgrade2140664671/007/elasticache-replication-group"},"loaderTarget":"127.0.0.1:59853","monitorAddress":"127.0.0.1:59852","organization":"organization","parallel":48,"program":".","project":"elasticache-replication-group","pwd":"/private/var/folders/qb/q9rbqmxn1jqdfps720v2s9h80000gn/T/TestElasticacheReplicationGroupUpgrade2140664671/007/elasticache-replication-group","stack":"test"},"response":{}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
{ | ||
"version": 3, | ||
"deployment": { | ||
"manifest": { | ||
"time": "2024-12-20T13:46:26.187433+01:00", | ||
"magic": "3b1911ae6e2d8d1f468975cdca7c3c6a48585f5e805330548231ecc6cfbc84ff", | ||
"version": "v3.136.1" | ||
}, | ||
"secrets_providers": { | ||
"type": "passphrase", | ||
"state": { | ||
"salt": "v1:oy5ax0JrJHw=:v1:uPbfPDSCG3f7S7Tc:xM0PIOYrlASy+hEOXlvtZF6vRhGylw==" | ||
} | ||
}, | ||
"resources": [ | ||
{ | ||
"urn": "urn:pulumi:test::elasticache-replication-group::pulumi:pulumi:Stack::elasticache-replication-group-test", | ||
"custom": false, | ||
"type": "pulumi:pulumi:Stack", | ||
"outputs": { | ||
"replicationGroupArn": "arn:aws:elasticache:us-west-2:616138583583:replicationgroup:replicationgroup-f1113fa" | ||
}, | ||
"created": "2024-12-20T12:38:08.439718Z", | ||
"modified": "2024-12-20T12:38:08.439718Z" | ||
}, | ||
{ | ||
"urn": "urn:pulumi:test::elasticache-replication-group::pulumi:providers:aws::default", | ||
"custom": true, | ||
"id": "3594d271-89a2-49ba-abff-89e893f43a1e", | ||
"type": "pulumi:providers:aws", | ||
"created": "2024-12-20T12:38:15.234254Z", | ||
"modified": "2024-12-20T12:38:15.234254Z" | ||
}, | ||
{ | ||
"urn": "urn:pulumi:test::elasticache-replication-group::aws:elasticache/replicationGroup:ReplicationGroup::replicationGroup", | ||
"custom": true, | ||
"id": "replicationgroup-f1113fa", | ||
"type": "aws:elasticache/replicationGroup:ReplicationGroup", | ||
"inputs": { | ||
"__defaults": [ | ||
"automaticFailoverEnabled", | ||
"engine", | ||
"multiAzEnabled", | ||
"replicationGroupId" | ||
], | ||
"atRestEncryptionEnabled": true, | ||
"automaticFailoverEnabled": false, | ||
"description": "Example Replication Group", | ||
"engine": "redis", | ||
"multiAzEnabled": false, | ||
"nodeType": "cache.m4.large", | ||
"numCacheClusters": 1, | ||
"port": 6379, | ||
"replicationGroupId": "replicationgroup-f1113fa" | ||
}, | ||
"outputs": { | ||
"__meta": "{\"e2bfb730-ecaa-11e6-8f88-34363bc7c4c0\":{\"create\":3600000000000,\"delete\":2400000000000,\"update\":2400000000000},\"schema_version\":\"1\"}", | ||
"arn": "arn:aws:elasticache:us-west-2:616138583583:replicationgroup:replicationgroup-f1113fa", | ||
"atRestEncryptionEnabled": true, | ||
"authToken": { | ||
"4dabf18193072939515e22adb298388d": "1b47061264138c4ac30d75fd1eb44270", | ||
"plaintext": "\"REDACTED BY PROVIDERTEST\"" | ||
}, | ||
"autoMinorVersionUpgrade": true, | ||
"automaticFailoverEnabled": false, | ||
"clusterEnabled": false, | ||
"clusterMode": { | ||
"numNodeGroups": 1, | ||
"replicasPerNodeGroup": 0 | ||
}, | ||
"dataTieringEnabled": false, | ||
"description": "Example Replication Group", | ||
"engine": "redis", | ||
"engineVersion": "7.1", | ||
"engineVersionActual": "7.1.0", | ||
"id": "replicationgroup-f1113fa", | ||
"kmsKeyId": "", | ||
"logDeliveryConfigurations": [], | ||
"maintenanceWindow": "thu:08:00-thu:09:00", | ||
"memberClusters": [ | ||
"replicationgroup-f1113fa-001" | ||
], | ||
"multiAzEnabled": false, | ||
"nodeType": "cache.m4.large", | ||
"numCacheClusters": 1, | ||
"numNodeGroups": 1, | ||
"numberCacheClusters": 1, | ||
"parameterGroupName": "default.redis7", | ||
"port": 6379, | ||
"primaryEndpointAddress": "replicationgroup-f1113fa.01fu6p.ng.0001.usw2.cache.amazonaws.com", | ||
"readerEndpointAddress": "replicationgroup-f1113fa-ro.01fu6p.ng.0001.usw2.cache.amazonaws.com", | ||
"replicasPerNodeGroup": 0, | ||
"replicationGroupDescription": "Example Replication Group", | ||
"replicationGroupId": "replicationgroup-f1113fa", | ||
"securityGroupIds": [], | ||
"securityGroupNames": [], | ||
"snapshotRetentionLimit": 0, | ||
"snapshotWindow": "11:30-12:30", | ||
"subnetGroupName": "default", | ||
"tags": {}, | ||
"tagsAll": {}, | ||
"transitEncryptionEnabled": false, | ||
"userGroupIds": [] | ||
}, | ||
"parent": "urn:pulumi:test::elasticache-replication-group::pulumi:pulumi:Stack::elasticache-replication-group-test", | ||
"provider": "urn:pulumi:test::elasticache-replication-group::pulumi:providers:aws::default::3594d271-89a2-49ba-abff-89e893f43a1e", | ||
"propertyDependencies": { | ||
"atRestEncryptionEnabled": [], | ||
"description": [], | ||
"nodeType": [], | ||
"numCacheClusters": [], | ||
"port": [] | ||
}, | ||
"additionalSecretOutputs": [ | ||
"authToken" | ||
], | ||
"created": "2024-12-20T12:46:26.168687Z", | ||
"modified": "2024-12-20T12:46:26.168687Z" | ||
} | ||
], | ||
"metadata": {} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's happening here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#4957 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah wait, just noticed I linked the PR and not the issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected the link, thanks for noticing!