Skip to content
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

chore: merge upstream v5.50.0 #119

Open
wants to merge 5,851 commits into
base: snyk
Choose a base branch
from
Open

chore: merge upstream v5.50.0 #119

wants to merge 5,851 commits into from

Conversation

evan-fugue
Copy link

@evan-fugue evan-fugue commented May 24, 2024

We were previously (as of a few days ago) based off v5.46.0, this just merges the changes between then and v5.50.0, which is the latest upstream release. Beyond moving at least a few resource types to AWS SDK for Go v2, I think this will bump the golang.org/x/net/http2 dependency which the Snyk scanner is complaining about.

I'm not actually planning on merging this, but instead doing a forced push from the snyk-rebase-v5.50.0 branch. The contents are exactly the same as this, but it rebases the Fugue/Snyk changes on top of v5.50.0 instead of merging the v5.50.0 changes in after the Fugue/Snyk changes. This helps keep the history clean and makes it a lot easier to merge in future changes; if we just merged, any future changes to the merged code will create a conflict, even if the contents of the change are the same. Unfortunately GitHub (and Git) don't really have a workflow for that...

Rather than looking at the changes in GitHub, I think it makes more sense to just look at the conflicts. You can do that locally with git show -p --cc af40b3f1e846e3535d07a5159c4824cd49711ef9

gdavison and others added 30 commits May 15, 2024 12:29
Adds a few additional filter patches missed on the previous PR adding multiclient support.
Don't use attribute literals for serialized test names
…ionMemberAccountWithProvider: Skip if no Organization.
…n: The specified policy is not currently attached to the target' on Delete.
# Conflicts:
#	internal/service/securitylake/securitylake_test.go
…dException: The provided account is not a registered delegated administrator for your organization' on Delete.
…s-tlscert

Allows generating tag tests for resource types that use self-signed certificates
Bumps [github.com/aws/aws-sdk-go](https:/aws/aws-sdk-go) from 1.53.2 to 1.53.3.
- [Release notes](https:/aws/aws-sdk-go/releases)
- [Commits](aws/aws-sdk-go@v1.53.2...v1.53.3)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
jar-b and others added 28 commits May 16, 2024 13:53
```console
% make testacc PKG=ec2 TESTS="TestAccVPCRouteTable_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCRouteTable_'  -timeout 360m

=== NAME  TestAccVPCRouteTable_ipv4ToLocalGateway
    vpc_route_table_test.go:528: skipping since no Outposts found
--- SKIP: TestAccVPCRouteTable_ipv4ToLocalGateway (0.89s)
=== CONT  TestAccVPCRouteTable_tags
=== NAME  TestAccVPCRouteTable_ipv4ToCarrierGateway
    wavelength_carrier_gateway_test.go:197: skipping since no Wavelength Zones are available
--- SKIP: TestAccVPCRouteTable_ipv4ToCarrierGateway (0.92s)
=== CONT  TestAccVPCRouteTable_Disappears_subnetAssociation
--- PASS: TestAccVPCRouteTable_requireRouteTarget (16.17s)
=== CONT  TestAccVPCRouteTable_ipv6ToEgressOnlyInternetGateway
--- PASS: TestAccVPCRouteTable_Disappears_subnetAssociation (25.59s)
=== CONT  TestAccVPCRouteTable_ipv4ToInternetGateway
--- PASS: TestAccVPCRouteTable_localRoute (27.40s)
=== CONT  TestAccVPCRouteTable_multipleRoutes
--- PASS: TestAccVPCRouteTable_basic (27.66s)
=== CONT  TestAccVPCRouteTable_disappears
--- PASS: TestAccVPCRouteTable_ipv4ToVPCPeeringConnection (29.30s)
=== CONT  TestAccVPCRouteTable_localRouteAdoptUpdate
--- PASS: TestAccVPCRouteTable_prefixListToInternetGateway (34.82s)
--- PASS: TestAccVPCRouteTable_gatewayVPCEndpoint (40.27s)
--- PASS: TestAccVPCRouteTable_IPv6ToNetworkInterface_unattached (41.95s)
--- PASS: TestAccVPCRouteTable_disappears (18.65s)
--- PASS: TestAccVPCRouteTable_vpcMultipleCIDRs (48.75s)
--- PASS: TestAccVPCRouteTable_conditionalCIDRBlock (51.75s)
--- PASS: TestAccVPCRouteTable_tags (51.31s)
--- PASS: TestAccVPCRouteTable_ipv6ToEgressOnlyInternetGateway (36.87s)
--- PASS: TestAccVPCRouteTable_Route_mode (58.10s)
--- PASS: TestAccVPCRouteTable_ipv4ToInternetGateway (32.69s)
--- PASS: TestAccVPCRouteTable_IPv4ToNetworkInterfaces_unattached (70.76s)
--- PASS: TestAccVPCRouteTable_localRouteAdoptUpdate (49.88s)
--- PASS: TestAccVPCRouteTable_localRouteImportUpdate (80.24s)
--- PASS: TestAccVPCRouteTable_multipleRoutes (155.59s)
--- PASS: TestAccVPCRouteTable_ipv4ToNatGateway (193.55s)
--- PASS: TestAccVPCRouteTable_vgwRoutePropagation (274.41s)
--- PASS: TestAccVPCRouteTable_ipv4ToTransitGateway (312.86s)
--- PASS: TestAccVPCRouteTable_ipv4ToInstance (332.41s)
--- PASS: TestAccVPCRouteTable_requireRouteDestination (338.51s)
--- PASS: TestAccVPCRouteTable_ipv4ToVPCEndpoint (367.97s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        373.221s
```
```console
% make testacc PKG=ec2 TESTS="TestAccVPCRouteTableAssociation_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCRouteTableAssociation_'  -timeout 360m

--- PASS: TestAccVPCRouteTableAssociation_disappears (20.24s)
--- PASS: TestAccVPCRouteTableAssociation_Subnet_basic (22.13s)
--- PASS: TestAccVPCRouteTableAssociation_Gateway_basic (23.73s)
--- PASS: TestAccVPCRouteTableAssociation_Subnet_changeRouteTable (32.20s)
--- PASS: TestAccVPCRouteTableAssociation_Gateway_changeRouteTable (35.29s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        40.378s
```
```console
% make testacc PKG=ec2 TESTS="TestAccVPCRouteTableDataSource_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCRouteTableDataSource_'  -timeout 360m

--- PASS: TestAccVPCRouteTableDataSource_main (12.71s)
--- PASS: TestAccVPCRouteTableDataSource_basic (17.20s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        22.270s
```
```console
% make testacc PKG=ec2 TESTS="TestAccVPCRouteTablesDataSource_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCRouteTablesDataSource_'  -timeout 360m

--- PASS: TestAccVPCRouteTablesDataSource_basic (16.06s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        21.118s
```
```console
%  make testacc PKG=ec2 TESTS="TestAccVPCDefaultRouteTable_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCDefaultRouteTable_'  -timeout 360m

--- PASS: TestAccVPCDefaultRouteTable_Disappears_vpc (15.78s)
--- PASS: TestAccVPCDefaultRouteTable_basic (23.28s)
--- PASS: TestAccVPCDefaultRouteTable_vpcEndpointAssociation (30.02s)
--- PASS: TestAccVPCDefaultRouteTable_tags (35.38s)
--- PASS: TestAccVPCDefaultRouteTable_prefixListToInternetGateway (37.40s)
--- PASS: TestAccVPCDefaultRouteTable_conditionalCIDRBlock (42.21s)
--- PASS: TestAccVPCDefaultRouteTable_Route_mode (48.90s)
--- PASS: TestAccVPCDefaultRouteTable_swap (57.83s)
--- PASS: TestAccVPCDefaultRouteTable_revokeExistingRules (111.44s)
=== NAME  TestAccVPCDefaultRouteTable_ipv4ToVPCEndpoint
    vpc_default_route_table_test.go:284: Step 1/3 error: Error running apply: exit status 1

        Error: modifying EC2 VPC Endpoint Service (vpce-svc-0182916f82dfce5bc) permissions: InvalidPrincipal: Invalid Principal: 'arn:aws:sts::727561393803:assumed-role/tf_aws_provider3_test-admin/[email protected]'
                status code: 400, request id: 124fc972-f18f-45fc-9cea-d1ba64a98108

          with aws_vpc_endpoint_service.test,
          on terraform_plugin_test.tf line 59, in resource "aws_vpc_endpoint_service" "test":
          59: resource "aws_vpc_endpoint_service" "test" {

--- FAIL: TestAccVPCDefaultRouteTable_ipv4ToVPCEndpoint (193.01s)
--- PASS: TestAccVPCDefaultRouteTable_ipv4ToTransitGateway (317.38s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/ec2        322.446s
```

Note: failing test is due to permissions on the test account user, and does not
fail in CI.
```console
% make testacc PKG=ec2 TESTS="TestAccSiteVPNGatewayRoutePropagation_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccSiteVPNGatewayRoutePropagation_'  -timeout 360m

--- PASS: TestAccSiteVPNGatewayRoutePropagation_basic (116.87s)
--- PASS: TestAccSiteVPNGatewayRoutePropagation_disappears (117.40s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        122.456s
```
```console
% make testacc PKG=ec2 TESTS="TestAccVPCEndpointService_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCEndpointService_'  -timeout 360m

--- PASS: TestAccVPCEndpointService_basic (222.92s)
--- PASS: TestAccVPCEndpointService_disappears (230.67s)
--- PASS: TestAccVPCEndpointService_tags (237.87s)
--- PASS: TestAccVPCEndpointService_privateDNSName (240.51s)
--- PASS: TestAccVPCEndpointService_allowedPrincipals (257.55s)
--- PASS: TestAccVPCEndpointService_supportedIPAddressTypes (261.17s)
--- PASS: TestAccVPCEndpointService_gatewayLoadBalancerARNs (345.01s)
--- PASS: TestAccVPCEndpointService_networkLoadBalancerARNs (424.64s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        429.837s
```
This flag adds the ability to append a `V2` suffix in cases where both V1 and V2 variants of the generated function name may be required.
```console
% make testacc PKG=ec2 TESTS="TestAccVPCEndpointServiceDataSource_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCEndpointServiceDataSource_'  -timeout 360m

--- PASS: TestAccVPCEndpointServiceDataSource_ServiceType_interface (9.56s)
--- PASS: TestAccVPCEndpointServiceDataSource_ServiceType_gateway (9.56s)
--- PASS: TestAccVPCEndpointServiceDataSource_custom (240.44s)
--- PASS: TestAccVPCEndpointServiceDataSource_CustomFilter_tags (246.50s)
--- PASS: TestAccVPCEndpointServiceDataSource_Custom_filter (246.50s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        251.682s
```
```console
% make testacc PKG=ec2 TESTS="TestAccVPCEndpointRouteTableAssociation_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCEndpointRouteTableAssociation_'  -timeout 360m

--- PASS: TestAccVPCEndpointRouteTableAssociation_disappears (27.88s)
--- PASS: TestAccVPCEndpointRouteTableAssociation_basic (29.42s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        34.605s
```
```console
% make testacc PKG=ec2 TESTS="TestAccVPCEndpointSecurityGroupAssociation_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCEndpointSecurityGroupAssociation_'  -timeout 360m

--- PASS: TestAccVPCEndpointSecurityGroupAssociation_basic (89.73s)
--- PASS: TestAccVPCEndpointSecurityGroupAssociation_replaceDefaultAssociation (110.24s)
--- PASS: TestAccVPCEndpointSecurityGroupAssociation_multiple (114.94s)
--- PASS: TestAccVPCEndpointSecurityGroupAssociation_disappears (121.24s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        126.457s
```
```console
% make testacc PKG=ec2 TESTS="TestAccVPCEndpointSubnetAssociation_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCEndpointSubnetAssociation_'  -timeout 360m

--- PASS: TestAccVPCEndpointSubnetAssociation_basic (232.03s)
--- PASS: TestAccVPCEndpointSubnetAssociation_disappears (236.22s)
--- PASS: TestAccVPCEndpointSubnetAssociation_multiple (396.87s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        402.119s
```
```console
% AWS_ALTERNATE_PROFILE=<redacted> make testacc PKG=ec2 TESTS="TestAccVPCEndpointConnectionAccepter_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCEndpointConnectionAccepter_'  -timeout 360m
=== RUN   TestAccVPCEndpointConnectionAccepter_crossAccount
--- PASS: TestAccVPCEndpointConnectionAccepter_crossAccount (341.74s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        346.795s
```
Note: acceptance tests fail locally with an IAM permissions issue, but should pass in TeamCity.
…ws sdk v2

```console
% make testacc PKG=ec2 TESTS="TestAccVPCEndpointServiceAllowedPrincipal_"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCEndpointServiceAllowedPrincipal_'  -timeout 360m

--- PASS: TestAccVPCEndpointServiceAllowedPrincipal_basic (211.30s)
--- PASS: TestAccVPCEndpointServiceAllowedPrincipal_multiple (220.94s)
--- PASS: TestAccVPCEndpointServiceAllowedPrincipal_tags (231.80s)
--- PASS: TestAccVPCEndpointServiceAllowedPrincipal_migrateID (236.87s)
--- PASS: TestAccVPCEndpointServiceAllowedPrincipal_migrateAndTag (247.32s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        252.532s
```
…sdkv2

Migrate `vpc` resources to AWS SDK V2 (Part 1)
Correct securityhub_configuration_policy_association import docs
…-environment-markdown

[DOCS] fix console command in developer environment setup instructions
…abels-cleanup

Use single custom label in GHA jobs
…ibution-improve_origin_ssl_protocols_arg_desc

docs: Improve origin_ssl_protocols arg doc for aws_cloudfront_distribution
Copy link

@tommyknows tommyknows left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole page is very unresponsive, so I failed to add comments to specific files. Have my cheap-man's version of this:

  • internal/service/ec2/ec2_instance.go sets AtLeastOneOf: ami or launchtemplate, while the hashLaunchSpecification in internal/service/ec2/ec2_spot_fleet_request.go does not do the check anymore if ami is still set. It directly calls buf.WriteString(..., m["ami"]) instead...might be dangerous?
  • there's a large block of commented code in internal/service/organizations/organization.go, on purpose?

Otherwise this looks good to me, as far as I understand the code & context 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.