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

Google-Beta Provider Configuration Not Recognized in Airgapped Environments Using TF 0.13+ #8182

Closed
jornjohnson opened this issue Jan 12, 2021 · 5 comments
Assignees
Labels

Comments

@jornjohnson
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

TF 0.13.5
TFE (Terraform Enterprise) 202012-2
google-beta 3.52.0

Affected Resource(s)

All resources defined by google_beta provider.

Terraform Configuration Files

terraform {
  backend "remote" {
    hostname = REDACTED
    organization = REDACTED

    workspaces {
      name = "aif-tf12-tf13-ws2-dev"
    }
  }
}

#locals {
#  tf13_ci                    = REDACTED
#  tf13_label_pau             = REDACTED
#  tf13_label_data_owner      = REDACTED
#  tf13_project_id            = REDACTED
#  tf13_monitoring_project_id = REDACTED
#  tf13_shared_bucket_name    = REDACTED
#  tf13_subnet_name           = REDACTED
#}
#
#module "tf13_mike_lim" {
#  source        = "TFE_REGISTRY/mcc/t-ai-user/google"
#  version       = "1.2.1-b20210111195426"
#  label_version = "1-2-1-b20210111195426"
#
#  env                      = var.env
#  label_billing_project    = var.label_billing_project
#  label_configuration_item = local.tf13_ci
#  label_organization       = var.label_organization
#  label_classification     = var.label_classification
#  label_pau                = local.tf13_label_pau
#  label_data_owner         = local.tf13_label_data_owner
#  label_workspace          = var.label_workspace
#  project_id               = local.tf13_project_id
#  shared_bucket_name       = local.tf13_shared_bucket_name
#  monitoring_project_id    = local.tf13_monitoring_project_id
#  region                   = var.region
#  subnet_name              = local.tf13_subnet_name
#  user_lan_id              = REDACTED
#  user_email               = REDACTED
#}

terraform {
  required_providers {
    null = {
      source = "hashicorp/null"
    }
    google-beta = {
      source = "hashicorp/google-beta"
    }
    google = {
      source = "hashicorp/google"
    }
  }
}

Debug Output

Debug Output - https://gist.github.com/jornjohnson/c8a533f99625ca9fa523cc2e92297ba3

Panic Output

Expected Behavior

Expected the google-beta provider configuration referenced in the terraform block to initialize the provider configurations for destroy actions on the last remaining google-beta defined resources.

Actual Behavior

Google-beta provider configuration doesn't appear to initialize, forcing terraform to resolve the provider against the public registry registry.terraform.io. In an airgapped environment with no internet access, this attempt at resolution times out.

Steps to Reproduce

  1. Run terraform init against airgapped Terraform Enterprise backend using bundled TF 0.13.5 with google-beta, google, and null providers.
  2. terraform plan which should error out.

Important Factoids

The configured environment is airgapped with a compiled TF and providers bundle uploaded to a self hosted TFE service. We've figured out a workaround by defining a dummy data resource in the config to initialize the provider. Then to finally clean up the config I can perform a terraform state rm call against the dummy data resource.

References

@ghost ghost added bug labels Jan 12, 2021
@edwardmedia edwardmedia self-assigned this Jan 12, 2021
@edwardmedia
Copy link
Contributor

edwardmedia commented Jan 13, 2021

@jornjohnson it appears to me this is an area of Terraform as it is a TF's feature? Did it work with different versions of the Google providers? You may file an issue in Terraform instead.

@jornjohnson
Copy link
Author

This is specific to only the google-beta provider, so I don't believe this is a terraform issue. The observed behavior does not extend to any other provider that I tested. The list includes;

  • hashicorp/google-beta
  • hashicorp/google
  • hashicorp/random
  • hashicorp/null
  • hashicorp/template
  • hashicorp/archive
  • hashicorp/vault

Due to our airgapped nature and reliance on bundled versions I was only able to test versions 3.52, 3.51, 3.42, and 3.38.

@ghost ghost removed the waiting-response label Jan 13, 2021
@edwardmedia
Copy link
Contributor

@jornjohnson there is nothing in the provider plugin that handles Airgapped Environments. I would suggest file an issue to Terraform to get help from them. Closing this accordingly.

@slevenick
Copy link
Collaborator

I would suggest asking for support from Hashicorp because support for airgapped environments appears to be a feature of Terraform Enterprise.

@ghost
Copy link

ghost commented Feb 13, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants