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

env0_aws_credentials - apply after import will delete+create #99

Closed
avnerenv0 opened this issue Jun 3, 2021 · 7 comments · Fixed by #380
Closed

env0_aws_credentials - apply after import will delete+create #99

avnerenv0 opened this issue Jun 3, 2021 · 7 comments · Fixed by #380
Assignees
Labels
bug Something isn't working

Comments

@avnerenv0
Copy link
Contributor

  1. Create a Cloud Credential
  2. Create the TF config for it
  3. Do a terraform import on it
  4. Apply- you will be prompted that the credential will be replaced

This is probably because we don't get the full state of the credential on the import.

@omry-hay omry-hay changed the title env0_aws_credentials - apply after import will delete+create env0_aws_credentials - apply after import will delete+create Aug 28, 2021
@yaronya yaronya added the bug Something isn't working label Sep 18, 2021
@yaronya
Copy link
Contributor

yaronya commented Sep 18, 2021

@eranelbaz
Copy link
Member

Cloud creds docs - AWS Assume Role we don't validate the cloud creds

create resource for that - https://github.com/env0/terraform-provider-env0/blob/main/docs/resources/aws_credentials.md#example-usage

run import https://github.com/env0/terraform-provider-env0/blob/main/docs/resources/aws_credentials.md#import

run terraform apply and it will ask you to replace the resource, but we don't need to replace that since we didn't made any changes to the resource

@roni-frantchi roni-frantchi added this to To do in Ongoing Issues Dec 21, 2021
@roni-frantchi roni-frantchi moved this from To do to In progress in Ongoing Issues Dec 21, 2021
@eranelbaz eranelbaz moved this from In progress to Blocked in Ongoing Issues Jan 5, 2022
@yaronya
Copy link
Contributor

yaronya commented May 3, 2022

@eranelbaz why this one is blocked? 🤔

@eranelbaz
Copy link
Member

it shouldn't be
the expected behavior is if we import and then apply, tf shouldn't detect changes

@yaronya yaronya assigned TomerHeber and unassigned samuel-br May 8, 2022
@yaronya yaronya moved this from Blocked to To do in Ongoing Issues May 8, 2022
@TomerHeber TomerHeber moved this from To do to In progress in Ongoing Issues May 9, 2022
@TomerHeber
Copy link
Collaborator

@yaronya @eranelbaz - I might be a little bit confused. However, env0_aws_credentials doesn't have an "import" implemented. What am I missing here?

@TomerHeber TomerHeber moved this from In progress to Blocked in Ongoing Issues May 9, 2022
@TomerHeber TomerHeber added the help wanted Extra attention is needed label May 9, 2022
@eranelbaz
Copy link
Member

@TomerHeber IIRC we removed it until we'll resolve that issue

@TomerHeber
Copy link
Collaborator

I'm adding import to the other credentials types as part of this issue.
(The AWS one has been merged).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

5 participants