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

no failure on non existing resource type #65

Open
marafa-sugarcrm opened this issue Jan 18, 2024 · 5 comments
Open

no failure on non existing resource type #65

marafa-sugarcrm opened this issue Jan 18, 2024 · 5 comments

Comments

@marafa-sugarcrm
Copy link

i ran ./aws2tf.sh -p $AWS_PROFILE -r $AWS_REGION -t aws_internet_gateway

it didnt really fail but i did see the error after the terraform init -upgrade step with

ls: ../../scripts/*-get-*aws_internet_gateway*.sh: No such file or directory
@awsandy
Copy link
Contributor

awsandy commented Jan 18, 2024

committed change so you can do:

./aws2tf.sh -p $AWS_PROFILE -r $AWS_REGION -t igw

You cannot gennerally call aws2tf with the terraform resource name as the type - you have to stick to what it supports

(The new upcoming python version will support that)

@marafa-sugarcrm
Copy link
Author

  1. the ls file not found error is still there
  2. i dont think aws2tf should run terraform plan for an "unsupported" resource - perhaps that check should come in earlier?
  3. the exit code is 0 for such a run. shouldnt it be a non zero? does aws2tf support that?

@awsandy
Copy link
Contributor

awsandy commented Jan 18, 2024

commited change to catch this and emit non zero exit code

@marafa-sugarcrm
Copy link
Author

goes thru configuring terraform before checking for the resource type.

@awsandy
Copy link
Contributor

awsandy commented Jun 27, 2024

The new Python version should handle this a lot better

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

No branches or pull requests

2 participants