Code Monkey home page Code Monkey logo

Comments (9)

antonbabenko avatar antonbabenko commented on July 27, 2024

If you are using it as a module you need to make sure that you are returning the output of ${module.atlantis.webhook_secret} from the module upwards to parent module.

webhook_secret and atlantis_url are returned by this module:

output "webhook_secret" {
description = "Webhook secret"
value = "${random_id.webhook.hex}"
}

from terraform-aws-atlantis.

chenrui333 avatar chenrui333 commented on July 27, 2024

Yeah, I thought the same thing, I can access atlantis_url though, but somehow the webhook_secret is not accessible:

output "webhook_secret" {
  description = "Alantis webhook URL"
  value       = "${module.atlantis.webhook_secret}"
}

Error: output 'webhook_secret': "webhook_secret" is not a valid output for module "atlantis"

But I can see it in the state list module.atlantis.random_id.webhook.

from terraform-aws-atlantis.

chenrui333 avatar chenrui333 commented on July 27, 2024

I can get atlantis_url though

output "atlantis_url" {
  description = "Alantis URL"
  value       = "${module.atlantis.atlantis_url}"
}

[terragrunt] 2019/01/31 12:13:51 Running command: terraform output
atlantis_url = https://atlantis.domain.io

from terraform-aws-atlantis.

antonbabenko avatar antonbabenko commented on July 27, 2024

I am not sure where to look into without seeing the code.

from terraform-aws-atlantis.

chenrui333 avatar chenrui333 commented on July 27, 2024

This is basically all the code, I did almost the same as in the README.

module "atlantis" {
  source = "terraform-aws-modules/atlantis/aws"

  name = "atlantis"

  # VPC
  cidr            = "10.20.0.0/20"
  azs             = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
  private_subnets = ["10.20.1.0/24", "10.20.2.0/24", "10.20.3.0/24"]
  public_subnets  = ["10.20.101.0/24", "10.20.102.0/24", "10.20.103.0/24"]

  # DNS (without trailing dot)
  route53_zone_name = "example.com"

  # ACM (SSL certificate) - Specify ARN of an existing certificate or new one will be created and validated using Route53 DNS
  certificate_arn = "arn:aws:acm:eu-west-1:135367859851:certificate/70e008e1-c0e1-4c7e-9670-7bb5bd4f5a84"

  # Atlantis
  atlantis_github_user       = "atlantis-bot"
  atlantis_github_user_token = "examplegithubtoken"
  atlantis_repo_whitelist    = ["github.com/terraform-aws-modules/*"]
}

from terraform-aws-atlantis.

antonbabenko avatar antonbabenko commented on July 27, 2024

And if you add this code:

output "webhook_secret" {
  description = "Alantis webhook URL"
  value       = "${module.atlantis.webhook_secret}"
}

and run terraform refresh, won't it work?

from terraform-aws-atlantis.

chenrui333 avatar chenrui333 commented on July 27, 2024

yeah, it does work!

I think I missed the terraform apply step, which did not give me the info, maybe?

Going to close the issue now, thanks @antonbabenko for your help!

from terraform-aws-atlantis.

antonbabenko avatar antonbabenko commented on July 27, 2024

Great! terraform refresh is enough. terraform apply is good too usually.

from terraform-aws-atlantis.

github-actions avatar github-actions commented on July 27, 2024

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.

from terraform-aws-atlantis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.