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

Ability to import an AWS OIDC account #661

Open
joechchung opened this issue Jul 2, 2024 · 4 comments
Open

Ability to import an AWS OIDC account #661

joechchung opened this issue Jul 2, 2024 · 4 comments
Labels
area/auth-and-accounts category/state-drift Problems with inconsistent state across multiple import/plan/apply runs kind/question Further information is requested

Comments

@joechchung
Copy link

Is your feature request related to a problem? Please describe.
We initially created our AWS OIDC account with Terraform but it somehow looks like the resource was disjointed from the state. It now tries to recreate the resource each time and will fail as there is a naming conflict. Since we widely use this AWS OIDC account now, it's not feasible to create another and change all the workflows

Describe the solution you'd like
Ability to import this resource into the Terraform state

Describe alternatives you've considered
No other alternatives apart from having to recreate the resource

Additional context
N/A

@berengamble
Copy link

This worked for me:

terraform import  'octopusdeploy_aws_openid_connect_account.my-account' Accounts-5

@joechchung
Copy link
Author

This worked for me:

terraform import  'octopusdeploy_aws_openid_connect_account.my-account' Accounts-5

This didn't work. It says the resource didn't exist. Was yours in the default space?

@domenicsim1
Copy link
Contributor

Hi @joechchung,
The terraform import works for me. Can we please get more detail about the setup.

  • Is the resource in default space?
  • Do you have the space set on the resource?
  • Have you tried to use an import block?

@domenicsim1 domenicsim1 added kind/question Further information is requested category/state-drift Problems with inconsistent state across multiple import/plan/apply runs area/auth-and-accounts labels Oct 15, 2024
@joechchung
Copy link
Author

  • Is the resource in default space?

No, it's not in the default space

  • Do you have the space set on the resource?

Yes, we have the space set on the resource

We shouldn't have to as we originally created the resource with Terraform but it seems to have not stored the resource in state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/auth-and-accounts category/state-drift Problems with inconsistent state across multiple import/plan/apply runs kind/question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants