Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Complete the update to latest Terrajet version #128

Merged
merged 13 commits into from
Nov 18, 2021

Conversation

muvaf
Copy link
Member

@muvaf muvaf commented Nov 16, 2021

Description of your changes

Updates all configs to match the new interfaces and updates Terrajet. There are a few small things like running Terrajet from go:generate that I'll open PRs in providertf-template.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Manually.

turkenh and others added 5 commits November 16, 2021 11:19
Signed-off-by: Hasan Turken <[email protected]>
(cherry picked from commit 9219249ee6584bf06ca6577ea1f969e379b57dd0)
Signed-off-by: Muvaffak Onus <[email protected]>
@@ -65,7 +65,7 @@ fallthrough: submodules
# - generated file
cobertura:
@cat $(GO_TEST_OUTPUT)/coverage.txt | \
grep -v zz_generated.deepcopy | \
grep -v zz_ | \
Copy link
Collaborator

Choose a reason for hiding this comment

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

good idea, should we reflect to tf-template?

Copy link
Member Author

Choose a reason for hiding this comment

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

//go:generate find ../internal/controller -type d -empty -delete

// NOTE(muvaf): Some of Terraform AWS provider files have "!generate" build tag
// that prevent us from using it for generator program.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this cause any problem?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, it's just that we can't use generate build tag like we do in other generation tools we have here.

config/autoscaling/config.go Outdated Show resolved Hide resolved
config/ecr/config.go Outdated Show resolved Hide resolved
config/ecrpublic/config.go Show resolved Hide resolved
config/elasticloadbalancing/config.go Outdated Show resolved Hide resolved
r.ShortGroup = "ec2"
case r.ShortGroup == "vpc":
r.ShortGroup = "ec2"
case name == "aws_lb_":
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
case name == "aws_lb_":
case strings.HasPrefix(name, "aws_lb"):

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a map with regexes and it covers both.

config/ecs/config.go Outdated Show resolved Hide resolved
Signed-off-by: Muvaffak Onus <[email protected]>
@muvaf muvaf merged commit 9bd1dd2 into crossplane-contrib:main Nov 18, 2021
@muvaf muvaf deleted the terrajet-new branch November 18, 2021 14:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants