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

FASTLY PLUGIN requires FASTLY_API_KEY set on workstation even when FASTLY_API_KEY env variable set in atlas #8156

Closed
neillturner opened this issue Aug 12, 2016 · 1 comment

Comments

@neillturner
Copy link

neillturner commented Aug 12, 2016

Fastly requires an api key to be specified to access the fastly api.
you can specify this as an environment variable FASTLY_API_KEY which is obviously
preferable as then you don't have to put the value in the terraform code.

when you run terraform with the remote option and atlas you can set the environment variable FASTLY_API_KEY in atalas.

however if you don't first set it on your workstation before calling terraform like this
export FASTLY_API_KEY="fakekey"
then you get error api_key not set.
You should not need to do this.

With the AWS provider you can set the environment variables

AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY 

in atlas
and you don't have to set the environment variables to some faske value before running terraform remote
on your workstation. I gues the AWS providers check wher ethe environment variable is set in atlas.

Terraform Version 0.6.16

Affected Resource(s)

provider "fastly"  
resource "fastly_service_v1"

Terraform Configuration Files

just create a fastly service without specifying a provider

resource "fastly_service_v1" "demo" {
  name = "demofastly"

  domain {
    name    = "demo.notexample.com"
    comment = "demo"
  }

  backend {
    address = "127.0.0.1"
    name    = "localhost"
    port    = 80
  }

  force_destroy = true
}

Debug Output

gives a message saying fastly provider api_key doesn't have a value.

Expected Behavior

it should check that atlas has the env variable FASTLY_API_KEY and if so not require the default value

Steps to Reproduce

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

  • Setup a terraform file as above.
  • Run terraform
terraform remote config 
terraform push
  • in atlas set the env variable FASTLY_API_KEY

Workaround

before running terraform

export FASTLY_API_KEY="fakekey"
@ghost
Copy link

ghost commented Apr 10, 2020

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants