Skip to content

Unable to import github_actions_environment_secret #1124

Closed as not planned
Closed as not planned

Description

@guilhermeblanco

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

Activity

  1. shailygupta commented on Oct 13, 2022

    @shailygupta

    We are seeing this behavior as well.

    Terraform Version: 1.1.6
    Github Provider Version: 5.4.0

  2. kfcampbell commented on Oct 27, 2022

    @kfcampbell
    Contributor

    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?

  3. kfcampbell commented on Oct 27, 2022

    @kfcampbell
    Contributor

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

  4. added
    Type: Bug
    Status: Triage
    on Oct 31, 2022
  5. moved this to 🔥 Backlog in 🧰 Octokit Activeon Dec 5, 2022
  6. added
    Status: Up for grabs
    on Jan 13, 2023
  7. added
    hacktoberfest
    on Sep 20, 2023
  8. removed
    Status: Triage
    on Oct 20, 2023
  9. github-actions commented on Jul 17, 2024

    @github-actions

    👋 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!

  10. added
    Status: Stale
    on Jul 17, 2024
  11. moved this from 🔥 Backlog to ✅ Done in 🧰 Octokit Activeon Jul 25, 2024
  12. whgiles commented on Nov 13, 2024

    @whgiles

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: StaleStatus: Up for grabsType: Bughacktoberfest

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions