cloudposse-archives / reference-architectures

[WIP] Get up and running quickly with one of our reference architecture using our fully automated cold-start process.
https://cloudposse.com/accelerate
Apache License 2.0
155 stars 33 forks source link

account-dns is broken #17

Closed marsadle closed 5 years ago

marsadle commented 5 years ago

Applying the account-dns module is currently broken, because of the changes made to allow_override attribute in Terraform (see https://github.com/terraform-providers/terraform-provider-aws/issues/7846).

https://github.com/cloudposse/terraform-root-modules/pull/131 would fix this, but I'm not sure how well the current terraform-root-modules version works with reference architecture.

osterman commented 5 years ago

Thanks @mmuehlberger !

So we fixed this upstream in our modules, but for now, pinning the aws provider to a pre-2.0 version is probably our best bet.

provider "aws" {
  version = "1.6.0"
}
osterman commented 5 years ago

The reference architecutres are still using the multi-stage docker approach which we've since moved away from, instead supporting terraform init -from-module=... which is better suited for CI/CD contexts

dalekurt commented 5 years ago

Is this related the this issue below?

Error: Error applying plan:

1 error(s) occurred:

* aws_route53_record.dns_zone_soa: 1 error(s) occurred:

* aws_route53_record.dns_zone_soa: [ERR]: Error building changeset: InvalidChangeBatch: [Tried to create resource record set [name='dev.lunarops.io.', type='SOA'] but it already exists]
    status code: 400, request id: 62e9dc75-45f8-11e9-9ee6-4fd7943f4538

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

make: *** [Makefile:11: apply] Error 1
make: Leaving directory '/conf/account-dns'

===============================================================================================
The account-dns module errored. Aborting.

* Please report this error here:
          https://github.com/cloudposse/reference-architectures/issues/new

Goodbye
make: *** [dev/provision] Error 1
osterman commented 5 years ago

@dalekurt you are absolutely correct :-) let me know if you need help working past it.

dalekurt commented 5 years ago

@osterman I would love some help!

marsadle commented 5 years ago

~@osterman So you basically have a single geodesic image that is stage agnostic and you pull the stage in dynamically? (like with the root and child modules, and furthermore the account module, in the reference architectures)?~ Stupid comment. 😀

Figured out what you meant, by looking at https://cloudposse/testing.cloudposse.co. So you are basically using terraform-root-modules on a per module basis, giving you the freedom to select a different version for each module. Did I understand that correctly?

osterman commented 5 years ago

@mmuehlberger you are correct! Sorry, got distracted by other things =)

dalekurt commented 5 years ago

Is there a fix for this @osterman ?

osterman commented 5 years ago

I think this was fixed in https://github.com/cloudposse/terraform-aws-route53-cluster-zone

We are working on this, this week.

dalekurt commented 5 years ago

@osterman Thanks for the update.