crossplane-contrib / provider-jet-aws

AWS Provider for Crossplane that is built with Terrajet.
https://crossplane.io
Apache License 2.0
37 stars 30 forks source link

Update Terraform provider to 3.x #150

Closed ulucinar closed 2 years ago

ulucinar commented 2 years ago

Description of your changes

This PR updates Terraform provider version to v3.71.0 which supports the aws_cloudfront_response_headers_policy resource. Some existing resources have API changes with this version. I have also tried the minimum required version of v3.64.0 but we still have some API changes in existing resources, so I went with the latest released version of the Terraform provider in this PR.

Note: I had to exclude aws_elasticache_user due to https://github.com/crossplane/terrajet/issues/100, for which a fix is under way.

Note: I just regenerated the Terraformed (managed) resources. No reconfiguration or no adjustments on the examples have been performed.

I have:

How has this code been tested

Ran make generate & make build.

muvaf commented 2 years ago

Note: I had to exclude aws_elasticache_user due to crossplane/terrajet#100, for which a fix is under way.

That issue is fixed now, can we re-include it?

maltejk commented 2 years ago

Is this still active?

muvaf commented 2 years ago

With https://github.com/crossplane-contrib/provider-jet-aws/pull/169 , we don't need to apply this hack to upgrade the provider anymore. @ulucinar you might want to do this in a clean PR rebased from main.

haarchri commented 2 years ago

any progress here ? did we need only to bump https://github.com/crossplane-contrib/provider-jet-aws/blob/main/Makefile#L9 ? @ulucinar

make generate                        
23:22:32 [ .. ] generating provider schema for hashicorp/aws 3.62.0
make[1]: *** [config/schema.json] Error 1
make: *** [generate] Error 2

we need LBTargetGroup targetType alb which was added in v3.62.0

---
apiVersion: elbv2.aws.jet.crossplane.io/v1alpha2
kind: LBTargetGroup
metadata:
  name: sample-alb-targetgroup
spec:
  forProvider:
    region: us-west-1
    name: sample-alb-targetgroup
    targetType: alb
    port: 80
    protocol: "TCP"
    vpcIdRef: 
      name: sample-vpc
  providerConfigRef:
    name: default

we can add the example afterwards in https://github.com/crossplane-contrib/provider-jet-aws/pull/211

ulucinar commented 2 years ago

Hi @haarchri, Now that we generate the Crossplane provider from JSON schema instead of the native provider source, I think we can close this PR.

haarchri commented 2 years ago

Yes but simpler Change im makefile to 3.62.0 for example is not working as you can See in my latest comment @ulucinar