Terraform: Error reading depends_on for aws_db_instance[db-eu-we1_preprod]: unknown slice type: *ast.LiteralType

Created on 10 Nov 2015  ยท  3Comments  ยท  Source: hashicorp/terraform

Hello,

I upgraded from 0.6.4 to master to have the S3 CORS support. I tested it with go 1.4.2 and go 1.5.1
When I try to launch a plan, I get this error : Error reading depends_on for aws_db_instance[db-eu-we1_preprod]: unknown slice type: *ast.LiteralType

I suppose the problem is on hcl and not terraform ?
Here is my block :

resource "aws_db_instance" "db-eu-we1_preprod" {
    depends_on = "aws_security_group.db-eu-we1_preprod"
    identifier = "rds-eu-we1-preprod"
    allocated_storage = 10
    engine = "mysql"
    [...]

At the moment, the master I use is this commit :
https://github.com/hashicorp/terraform/commit/0d69159fc519d164af89adc797eb1df9b1110e9b

Thanks

Most helpful comment

Hi Seraf! Can you try surrounding your depends_on value with array syntax like this?

resource "aws_db_instance" "db-eu-we1_preprod" {
    depends_on = ["aws_security_group.db-eu-we1_preprod"]
    identifier = "rds-eu-we1-preprod"
    allocated_storage = 10
    engine = "mysql"
    [...]

All 3 comments

Hi Seraf! Can you try surrounding your depends_on value with array syntax like this?

resource "aws_db_instance" "db-eu-we1_preprod" {
    depends_on = ["aws_security_group.db-eu-we1_preprod"]
    identifier = "rds-eu-we1-preprod"
    allocated_storage = 10
    engine = "mysql"
    [...]

Hi @jen20
Thanks for the tips, it works like a charm ! Shame on me to haven't found it.

Thanks for the reactivity !

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.

Was this page helpful?
0 / 5 - 0 ratings