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

V6 #2609

Merged
merged 45 commits into from
Aug 8, 2023
Merged

V6 #2609

merged 45 commits into from
Aug 8, 2023

Conversation

iwahbe
Copy link
Member

@iwahbe iwahbe commented Jul 11, 2023

The feature branch for the next major version of pulumi-aws.

rquitales and others added 23 commits June 13, 2023 16:20
* Update upstream to patched v5.1.0-alpha.1 and run patch

* Run `make tfgen`

* Update Go module package name to v6 suffix

* Remove problematic quicksight dashboard and analytics definition property

* Run `make tfgen build_sdks`

* Use PlanState for diff strategy with provider

* tests: Fix broken CodeBuild test by removing deprecated fields

* Fix v6 import for Go examples

Run `VERSION_PREFIX=6.0.0 make tfgen build_sdks`

* Update examples and SDK to v6
Start serving some resources off Plugin Framework
Add acceptance test for PF based resources
Use PlanState for diff strategy with provider
Bring in newer pu/pu so the test harness framework support Pulumi yaml.
Skip EditDirs in TestAccWebserver to workaround pulumi/pulumi#12859

---------

Co-authored-by: Ramon Quitales <[email protected]>
This reinstates 2 resources that were skipped to avoid C# SDK compilation issues, removing the TODOs.
Closes #2596

Auto-generate prefixes as "pu" instead of "tf". This is normally followed by a hyphen but is sometimes just "tf" alone.
[v6] Refactor WafV2 types to recursive
* Point upstream to v5.1.0-alpha.2

* Provider

* SDKs

* Restore "aws_gamelift_matchmaking_*"

---------

Co-authored-by: Mikhail Shilkov <[email protected]>
Co-authored-by: Ian Wahbe <[email protected]>
* Upgrade upstream from v5.1.0 to v5.7.0

* make tfgen

* make build_sdks

* Update /shim to go1.20

* Upgrade bridge and pulumi versions

* Depend on bridge#1285
@iwahbe iwahbe marked this pull request as draft July 11, 2023 12:45
mikhailshilkov and others added 6 commits July 11, 2023 19:53
…tion

Fix capitalisation of function getOpenIdConnectProvider
* Fix pulumi-aws#1423

* Add explicit provider

---------

Co-authored-by: Ian Wahbe <[email protected]>
* Avoid importing full root `@pulumi/aws` module (#2569)

Every folder inside the AWS Node.js SDK that has a mixin was importing "../utils", which imports "./awsMixins" which itself was forcing import of "." which then goes back and tries to force import of everything.  There is no clear reason why forcing this root module import was ever necesary. Nothing that imports utils.ts depends on the side effects caused by "awsMixins", and the primary effect of adding the `sdk` getter onto the root module is only relevant if the end user loads that root module itself so they can access this property.

Also expands some existing test coverage to test this and use of `aws.sdk`, which is the related feature that could in principle be impacted by removing this forced side effect

Fixes #772.

* Remove aws.sdk property

The `aws.sdk` proeprty was introduced several years ago to offer a convenient way for callbacks using function serialization to get ahold of the AWS SDK which is available within the Lambda runtime.

However, the AWS SDK v2 that was exposed here is being deprecated, and has been emitted a deprecation warning for some time for anyone using this via Pulumi.

The AWS SDK v3 doesn't expose a monolitchic module we can expose here - providing instead many seperate SDKs for each service.

So we expect the best path is to drop this from the AWS provider in the upcoming major version release.

Users who were using it in <6.0.0 versions will need to move to using `@aws-sdk/client-s3` or similar libraries directly.
Add global replacement for "tf" prefixes
* Replace `boolRef` and `stringRef` with `ref[T]`

* Remove rename calls

* make tfgen

* make build_sdks

* Remove backwards compatibility tests
* Remove or Justify MaxItemsOne: true

This is the set of changes that prevent Pulumi users from consuming the full scope of the
TF provider's API. For every `MaxItemsOne: true`, I have checked that we should remove it
or documented why it should remain.

* make tfgen

* make build_sdks

* Fix pluralization issues introduced by removing `MaxItemsOne: true`

These include:
- Kinesis -> Kineses -> Kinese (fixed so Singular(Kineses) = Kinesis)
- s3 -> s3s (pinned to s3)
- sqs -> sq (pinned to sqs)
- sns -> sn (pinned to sns)
- elasticsearch -> elasticsearches (pinned to elasticsearch)

* make build_sdks
* Update JAVA_GEN_VERSION to 0.9.5

* make build_java
* Upgrade upstream from v5.7.0 to v5.8.0

* make tfgen

* make build_sdks
@iwahbe iwahbe force-pushed the v6 branch 2 times, most recently from 7dd6001 to 034ac75 Compare July 18, 2023 13:54
@pulumi pulumi deleted a comment from github-actions bot Jul 18, 2023
@pulumi pulumi deleted a comment from github-actions bot Jul 18, 2023
@pulumi pulumi deleted a comment from github-actions bot Jul 18, 2023
@pulumi pulumi deleted a comment from github-actions bot Jul 19, 2023
@github-actions

This comment was marked as outdated.

# Conflicts:
#	examples/bucket/index.ts
#	examples/examples_nodejs_test.go
#	examples/go.mod
#	examples/go.sum
#	provider/cmd/pulumi-resource-aws/schema.json
#	provider/go.mod
#	provider/go.sum
#	provider/resources.go
#	sdk/dotnet/ApplicationLoadBalancing/LoadBalancer.cs
#	sdk/dotnet/Ec2/GetSubnetIds.cs
#	sdk/dotnet/ElasticLoadBalancingV2/LoadBalancer.cs
#	sdk/dotnet/Lambda/Function.cs
#	sdk/go/aws/acm/certificate.go
#	sdk/go/aws/alb/loadBalancer.go
#	sdk/go/aws/appconfig/getConfigurationProfiles.go
#	sdk/go/aws/applicationloadbalancing/loadBalancer.go
#	sdk/go/aws/appsync/graphQLApi.go
#	sdk/go/aws/controltower/controlTowerControl.go
#	sdk/go/aws/controltower/getControls.go
#	sdk/go/aws/ebs/getEbsVolumes.go
#	sdk/go/aws/ec2/getInstances.go
#	sdk/go/aws/ec2/getLocalGatewayVirtualInterface.go
#	sdk/go/aws/ec2/getSubnetIds.go
#	sdk/go/aws/ec2/getVpcPeeringConnections.go
#	sdk/go/aws/ec2transitgateway/getVpcAttachments.go
#	sdk/go/aws/eks/fargateProfile.go
#	sdk/go/aws/eks/getNodeGroups.go
#	sdk/go/aws/eks/nodeGroup.go
#	sdk/go/aws/elasticloadbalancingv2/loadBalancer.go
#	sdk/go/aws/iot/getEndpoint.go
#	sdk/go/aws/lambda/function.go
#	sdk/go/aws/lb/loadBalancer.go
#	sdk/go/aws/networkmanager/coreNetwork.go
#	sdk/go/aws/networkmanager/coreNetworkPolicyAttachment.go
#	sdk/go/aws/rds/proxyEndpoint.go
#	sdk/go/aws/s3control/multiRegionAccessPointPolicy.go
#	sdk/java/src/main/java/com/pulumi/aws/lambda/Function.java
#	sdk/nodejs/lambda/function.ts
#	sdk/python/pulumi_aws/_inputs.py
#	sdk/python/pulumi_aws/acmpca/certificate_authority.py
#	sdk/python/pulumi_aws/applicationloadbalancing/get_listener.py
#	sdk/python/pulumi_aws/applicationloadbalancing/get_load_balancer.py
#	sdk/python/pulumi_aws/applicationloadbalancing/get_target_group.py
#	sdk/python/pulumi_aws/applicationloadbalancing/listener.py
#	sdk/python/pulumi_aws/applicationloadbalancing/listener_rule.py
#	sdk/python/pulumi_aws/applicationloadbalancing/load_balancer.py
#	sdk/python/pulumi_aws/appsync/graph_ql_api.py
#	sdk/python/pulumi_aws/autoscaling/attachment.py
#	sdk/python/pulumi_aws/autoscaling/get_group.py
#	sdk/python/pulumi_aws/autoscaling/group.py
#	sdk/python/pulumi_aws/budgets/budget.py
#	sdk/python/pulumi_aws/cloudtrail/get_function.py
#	sdk/python/pulumi_aws/codebuild/_inputs.py
#	sdk/python/pulumi_aws/codebuild/outputs.py
#	sdk/python/pulumi_aws/config/outputs.py
#	sdk/python/pulumi_aws/connect/get_hours_of_operation.py
#	sdk/python/pulumi_aws/connect/hours_of_operation.py
#	sdk/python/pulumi_aws/connect/queue.py
#	sdk/python/pulumi_aws/connect/routing_profile.py
#	sdk/python/pulumi_aws/costexplorer/anomaly_subscription.py
#	sdk/python/pulumi_aws/ec2/_inputs.py
#	sdk/python/pulumi_aws/ec2/default_vpc.py
#	sdk/python/pulumi_aws/ec2/get_launch_configuration.py
#	sdk/python/pulumi_aws/ec2/get_subnet_ids.py
#	sdk/python/pulumi_aws/ec2/launch_configuration.py
#	sdk/python/pulumi_aws/ec2/outputs.py
#	sdk/python/pulumi_aws/ec2/route.py
#	sdk/python/pulumi_aws/ec2/spot_fleet_request.py
#	sdk/python/pulumi_aws/ec2/vpc.py
#	sdk/python/pulumi_aws/ec2clientvpn/endpoint.py
#	sdk/python/pulumi_aws/ec2clientvpn/network_association.py
#	sdk/python/pulumi_aws/ec2transitgateway/get_connect_peer.py
#	sdk/python/pulumi_aws/ecs/cluster.py
#	sdk/python/pulumi_aws/elasticache/_inputs.py
#	sdk/python/pulumi_aws/elasticache/cluster.py
#	sdk/python/pulumi_aws/elasticache/get_cluster.py
#	sdk/python/pulumi_aws/elasticache/get_replication_group.py
#	sdk/python/pulumi_aws/elasticache/outputs.py
#	sdk/python/pulumi_aws/elasticache/replication_group.py
#	sdk/python/pulumi_aws/elasticloadbalancing/get_hosted_zone_id.py
#	sdk/python/pulumi_aws/elasticloadbalancing/get_load_balancer.py
#	sdk/python/pulumi_aws/elasticloadbalancing/get_service_account.py
#	sdk/python/pulumi_aws/elasticloadbalancing/load_balancer_backend_server_policy.py
#	sdk/python/pulumi_aws/elasticloadbalancing/load_balancer_policy.py
#	sdk/python/pulumi_aws/elasticloadbalancingv2/get_listener.py
#	sdk/python/pulumi_aws/elasticloadbalancingv2/get_load_balancer.py
#	sdk/python/pulumi_aws/elasticloadbalancingv2/get_target_group.py
#	sdk/python/pulumi_aws/elasticloadbalancingv2/listener.py
#	sdk/python/pulumi_aws/elasticloadbalancingv2/listener_rule.py
#	sdk/python/pulumi_aws/elasticloadbalancingv2/load_balancer.py
#	sdk/python/pulumi_aws/get_ami.py
#	sdk/python/pulumi_aws/get_ami_ids.py
#	sdk/python/pulumi_aws/get_autoscaling_groups.py
#	sdk/python/pulumi_aws/get_billing_service_account.py
#	sdk/python/pulumi_aws/get_caller_identity.py
#	sdk/python/pulumi_aws/get_canonical_user_id.py
#	sdk/python/pulumi_aws/get_elastic_ip.py
#	sdk/python/pulumi_aws/get_partition.py
#	sdk/python/pulumi_aws/get_prefix_list.py
#	sdk/python/pulumi_aws/globalaccelerator/get_accelerator.py
#	sdk/python/pulumi_aws/iam/get_open_id_connect_provider.py
#	sdk/python/pulumi_aws/iam/get_policy_document.py
#	sdk/python/pulumi_aws/identitystore/get_group.py
#	sdk/python/pulumi_aws/identitystore/get_user.py
#	sdk/python/pulumi_aws/kendra/data_source.py
#	sdk/python/pulumi_aws/kendra/index.py
#	sdk/python/pulumi_aws/kinesis/firehose_delivery_stream.py
#	sdk/python/pulumi_aws/lambda_/event_source_mapping.py
#	sdk/python/pulumi_aws/lambda_/function.py
#	sdk/python/pulumi_aws/lightsail/instance.py
#	sdk/python/pulumi_aws/msk/_inputs.py
#	sdk/python/pulumi_aws/msk/outputs.py
#	sdk/python/pulumi_aws/networkmanager/core_network.py
#	sdk/python/pulumi_aws/opensearch/get_domain.py
#	sdk/python/pulumi_aws/provider.py
#	sdk/python/pulumi_aws/rds/get_instance.py
#	sdk/python/pulumi_aws/rds/instance.py
#	sdk/python/pulumi_aws/redshift/cluster.py
#	sdk/python/pulumi_aws/redshift/get_cluster.py
#	sdk/python/pulumi_aws/secretsmanager/get_secret.py
#	sdk/python/pulumi_aws/secretsmanager/secret.py
#	sdk/python/pulumi_aws/sfn/get_state_machine.py
#	sdk/python/pulumi_aws/ssm/get_parameter.py
#	sdk/python/pulumi_aws/wafv2/_inputs.py
#	sdk/python/pulumi_aws/wafv2/outputs.py
- Add more feedback to what we're doing and why.
- Explain how the default tags are applied by the bridge.
- Disable step 5 of the test until we resolve #2633
* Override name

* make tfgen

* make build_sdks
* Update upstream to v5.9.0

The many changes to replacements.json are caused by a new format for imports.

* make tfgen

* make build_sdks
* Move field `roleInstance` from `Function` to `CallbackFunction`

Fixes #2639

This actually makes the mixin more self-contained, since we previously added a field to a
normal pulumi resource, making TS's `lambda.Function` different then Go's
`lambda.Function`. With this change, `lambda.Function` is the same in all languages.

* Remove deprecated serverless.Function

`serverless.Function` has been deprecated in favor of `lambda.CallbackFunction` since
2018 (#327). Since it depends on the removed
functionality, I have bundled its removal.
@iwahbe iwahbe self-assigned this Jul 26, 2023
danielrbradley and others added 8 commits August 1, 2023 13:58
We no longer use this since #2584
* Upgrade pulumi-terraform-bridge to v3.55.0

* Update schema.json

* Update go

* Update ts
Support AutoName for Plugin Framework based resources. The following resources will receive a Pulumi-generated value in their "name" argument if none is specified by the user. The value will be based on the resource name from the user program followed by a random suffix:

```
resource:aws_appconfig_environment
resource:aws_auditmanager_assessment
resource:aws_auditmanager_assessment_report
resource:aws_auditmanager_control
resource:aws_auditmanager_framework
resource:aws_cognito_user_pool_client
resource:aws_opensearchserverless_access_policy
resource:aws_opensearchserverless_collection
resource:aws_opensearchserverless_security_config
resource:aws_opensearchserverless_security_policy
resource:aws_opensearchserverless_vpc_endpoint
resource:aws_quicksight_vpc_connection
resource:aws_resourceexplorer2_view
resource:aws_route53_cidr_collection
resource:aws_route53_cidr_location
resource:aws_simpledb_domain
```
* Add GRPC test to replicate 2633

* Test that we set "tags" on creation

TF does, and if we assume that "tags" is set correctly, we then get the expected diff.

* Ensure valid diffs by overriding check

* Remove `.XComputeInput`

This fix takes effect during Check, which occurs before Diff. We don't need to do anything
special for Diff now.

* Depend on pulumi/pulumi-terraform-bridge#1310

* Turn tests back on

* Consume upstream changes

The previous fix works on all resources... except our s3legacy bucket because it was not
updated to use upstream's new tags strategy. I have changed our fork to use the new
strategy.

The change is here:
https://github.com/pulumi/terraform-provider-aws/compare/patched-v5.9.0...patched-v5.9.0-with-modern-s3legacy-tags?expand=1

* Explain .Mappable() has the same shape as NewTagConfig expected

* Template out YAML Tests

* Accommodate aws:cognito:UserPool

* Switch to environment for pf

* Add a test for aws:s3:BucketV2

We are seeing tests fail for aws:cognito:UserPool but I know this works for
aws:s3:BucketV2. These are both SDKv2 resources. Since they work differently I have
ensured that both are tested.

* Skip aws:cognito:UserPool test

This resource is broken upstream, so we skip the test here.

* Remove outdated tests

I have left skeleton code for GRPC based testing, as I often find it useful when debugging
locally. I have noted that it does not run in CI, and is just there for local development.

* Don't pass empty tags properties
* Update `upstream` to v5.11.0

* make tfgen

* build_sdks
* Upgrade bridge to v3.56.2 and 0.15.1

* Bump to pf v0.15.2
@iwahbe iwahbe marked this pull request as ready for review August 8, 2023 09:34
@iwahbe iwahbe merged commit ab1f2fb into master Aug 8, 2023
33 checks passed
@iwahbe iwahbe deleted the v6 branch August 8, 2023 09:34
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.

6 participants