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

Unable to import github_actions_environment_secret #1124

Closed
guilhermeblanco opened this issue Apr 22, 2022 · 5 comments
Closed

Unable to import github_actions_environment_secret #1124

guilhermeblanco opened this issue Apr 22, 2022 · 5 comments
Labels
hacktoberfest Issues for participation in Hacktoberfest Status: Stale Used by stalebot to clean house Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented

Comments

@guilhermeblanco
Copy link

Affected Resource(s)

Please list the resources as a list, for example:

  • github_actions_environment_secret

Terraform Configuration Files

terraform {
  required_version = "~> 1.0"

  required_providers {
    github = {
      source  = "integrations/github"
      version = "~> 4.23.0"
    }
  }
}

provider "github" {
  token = module.github_secrets.secret_value["access_token"]
  owner = "XXXX"
}

resource "github_actions_environment_secret" "remote_host" {
  environment     = github_repository_environment.prod.environment
  repository      = data.github_repository.this.name
  secret_name     = "REMOTE_HOST"
  plaintext_value = module.prod_secrets.secret_value["host"]
}

Expected Behavior

What should have happened?

Terraform should have imported the resource

Actual Behavior

What actually happened?

Currently unable to import github_actions_environment_secret.

❯ terraform import 'github_actions_environment_secret.remote_host' REMOTE_HOST
github_actions_environment_secret.remote_host: Importing from ID "REMOTE_HOST"...
╷
│ Error: resource github_actions_environment_secret doesn't support import

While in the documentation it is stated that:

Screenshot from 2022-04-21 22-46-10

Steps to Reproduce

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

  1. terraform import 'github_actions_environment_secret.remote_host' REMOTE_HOST
@shailygupta
Copy link

We are seeing this behavior as well.

Terraform Version: 1.1.6
Github Provider Version: 5.4.0

@kfcampbell
Copy link
Member

Hmm...it looks like this behavior was introduced in #805 and never actually supported import. I'll open a quick PR to change the docs. In the meantime, is this a behavior you would consider opening a PR to fix?

@kfcampbell
Copy link
Member

cc @nadenf for visibility. Is that something you're interested in?

@nickfloyd nickfloyd added Type: Bug Something isn't working as documented Status: Triage This is being looked at and prioritized Priority: Normal labels Oct 31, 2022
@nickfloyd nickfloyd moved this to 🔥 Backlog in 🧰 Octokit Active Dec 5, 2022
@nickfloyd nickfloyd added the Status: Up for grabs Issues that are ready to be worked on by anyone label Jan 13, 2023
@nickfloyd nickfloyd added the hacktoberfest Issues for participation in Hacktoberfest label Sep 20, 2023
@kfcampbell kfcampbell removed the Status: Triage This is being looked at and prioritized label Oct 20, 2023
Copy link

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Jul 17, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2024
@github-project-automation github-project-automation bot moved this from 🔥 Backlog to ✅ Done in 🧰 Octokit Active Jul 25, 2024
@whgiles
Copy link

whgiles commented Nov 13, 2024

Are there any plans to add this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues for participation in Hacktoberfest Status: Stale Used by stalebot to clean house Status: Up for grabs Issues that are ready to be worked on by anyone Type: Bug Something isn't working as documented
Projects
None yet
Development

No branches or pull requests

5 participants