Quantcast
Channel: Terraform - HashiCorp Discuss
Viewing all articles
Browse latest Browse all 11453

How to provide params for this option of AWS provider?

$
0
0

It seems that there are missing information from the docs here [https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/apigatewayv2_api#cors_configuration].
I don’t see any example for the cors_configuration param.

Here is the code of this module

https://github.com/terraform-providers/terraform-provider-aws/blob/7ce1660fd27d4de99793b7c01a56ec98226d0a34/aws/resource_aws_apigatewayv2_api.go#L43

I read about Schema Attributes and Types but still cannot deal with it https://www.terraform.io/docs/extend/schemas/schema-types.html.

Here is my configuration:

resource "aws_apigatewayv2_api" "_" {
  name          = "staging API"
  protocol_type = "HTTP"
  cors_configuration = [
    "allow_origins" = ["api.test.com"],
    "allow_methods" = ["POST", "GET"],
    "allow_headers" = ["content-type"],
    "max_age"       = 300
  ]
}

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 11453

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>