hashicorp / terraform-provider-awscc

Terraform AWS Cloud Control provider
https://registry.terraform.io/providers/hashicorp/awscc/latest/docs
Mozilla Public License 2.0
256 stars 116 forks source link

awscc_apigateway_domain_name - Requires optional domain_name input #1859

Open BondAnthony opened 3 months ago

BondAnthony commented 3 months ago

Community Note

Terraform CLI and Terraform AWS Cloud Control Provider Version

Affected Resource(s)

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "awscc_apigateway_domain_name" "example" {}

Debug Output

Panic Output

Expected Behavior

Actual Behavior

╷
│ Error: AWS SDK Go Service Operation Incomplete
│ 
│   with awscc_apigateway_domain_name.example,
│   on main.tf line 24, in resource "awscc_apigateway_domain_name" "example":
│   24: resource "awscc_apigateway_domain_name" "example" {
│ 
│ Waiting for Cloud Control API service CreateResource operation completion returned: waiter state transitioned to FAILED.
│ StatusMessage: Error occurred during operation '1 validation error detected: Value null at 'createDomainNameInput.domainName'
│ failed to satisfy constraint: Member must not be null (Service: ApiGateway, Status Code: 400, Request ID:
│ 853cb2db-6f96-44e1-9f2b-d59d5e99969f)'.. ErrorCode: GeneralServiceException
╵

Steps to Reproduce

  1. terraform apply

Important Factoids

Works when you provide a domain_name and certificate_arn

resource "awscc_apigateway_domain_name" "example" {
  domain_name = "example.com"
  certificate_arn = aws_acm_certificate.example.arn
}

CloudFormation schema has the DomanName attribute marked as optional. The CloudFormation schema should be updated to require the domain name attribute.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-domainname.html#cfn-apigateway-domainname-endpointconfiguration

References

BondAnthony commented 3 months ago

Opened an internal AWS service ticket for the schema.