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

Complete the update to latest Terrajet version#128

Merged
muvaf merged 13 commits intocrossplane-contrib:mainfrom
muvaf:terrajet-new
Nov 18, 2021
Merged

Complete the update to latest Terrajet version#128
muvaf merged 13 commits intocrossplane-contrib:mainfrom
muvaf:terrajet-new

Conversation

@muvaf
Copy link
Copy Markdown
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]>
Comment thread Makefile
cobertura:
@cat $(GO_TEST_OUTPUT)/coverage.txt | \
grep -v zz_generated.deepcopy | \
grep -v zz_ | \
Copy link
Copy Markdown
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
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Comment thread apis/generate.go
//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
Copy Markdown
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
Copy Markdown
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.

Comment thread config/autoscaling/config.go Outdated
Comment thread config/ecr/config.go Outdated
Comment thread config/ecrpublic/config.go
Comment thread config/elasticloadbalancing/config.go Outdated
Comment thread config/provider.go Outdated
r.ShortGroup = "ec2"
case r.ShortGroup == "vpc":
r.ShortGroup = "ec2"
case name == "aws_lb_":
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread config/ecs/config.go Outdated
Comment thread config/provider.go
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