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

Cannot use configuration generation tool #423

Open
remyleone opened this issue Jan 29, 2024 · 0 comments
Open

Cannot use configuration generation tool #423

remyleone opened this issue Jan 29, 2024 · 0 comments

Comments

@remyleone
Copy link

Hi there,

Terraform Version

$ terraform -version                                        
Terraform v1.7.1
on darwin_arm64

Affected Resource(s)

  • opsgenie_team

Terraform Configuration Files

import {
  id = "11111111-1111-1111-1111-111111111111"
  to = "opsgenie_team.devtools"
}

Debug Output

$ terraform plan -generate-config-out=generated_resources.tf
╷
│ Error: Invalid import address
│ 
│   on main.tf line 27, in import:
│   27:   to = "opsgenie_team.devtools"
│ 
│ Only managed resources can be imported.
╵
╷
│ Error: Invalid expression
│ 
│   on main.tf line 27, in import:
│   27:   to = "opsgenie_team.devtools"
│ 
│ A single static variable reference is required: only attribute access and indexing with constant keys. No calculations, function calls, template expressions, etc are allowed
│ here.

Expected Behavior

It should generate a configuration block that I can use to import easily existing ressources in terraform.

Actual Behavior

The generation is not working.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

provider "opsgenie" {
  api_url = "api.eu.opsgenie.com" #default is api.opsgenie.com
  # my api key is defined
}
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

1 participant