Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

awscc_location_api_key : optional keys marked required for creation #1721

Open
quixoticmonk opened this issue May 18, 2024 · 1 comment
Open
Labels
bug upstream-aws Unable to proceed due to missing or broken functionality from an AWS dependency.

Comments

@quixoticmonk
Copy link
Collaborator

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.

Terraform CLI and Terraform AWS Cloud Control Provider Version

  • Terraform CLI : Terraform v1.7.4
  • Provider version : v0.77.0

Affected Resource(s)

  • awscc_location_api_key

Terraform Configuration Files

The configuration below are the inputs required per schema. The expiry based inputs are required based on the API response when a Terraform apply is performed.

resource "awscc_location_api_key" "example" {
  key_name = "example_key"
  description = "Example Location API key"
  restrictions = {
    allow_actions = ["geo:GetMap*","geo:GetPlace"]
    allow_resources = ["arn:aws:geo:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:map/ExampleMap*"]
    
  }
}

Debug Output

Panic Output

Expected Behavior

The resource should be created without any errors.

Actual Behavior

awscc_location_api_key.example: Creating...
╷
│ Error: AWS SDK Go Service Operation Incomplete
│
│   with awscc_location_api_key.example,
│   on main.tf line 1, in resource "awscc_location_api_key" "example":
│    1: resource "awscc_location_api_key" "example" {
│
│ Waiting for Cloud Control API service CreateResource operation completion returned: waiter
│ state transitioned to FAILED. StatusMessage: Invalid request provided: At least one of the
│ following fields must be set: 'ExpireTime', 'NoExpiry'. (Service: Location, Status Code: 400,
│ Request ID: ef69e495-81fa-47e2-bbb1-b11de593b8ce). ErrorCode: InvalidRequest
╵

Steps to Reproduce

  1. terraform apply

Important Factoids

References

@quixoticmonk quixoticmonk changed the title awscc_location_api_key : optional keys awscc_location_api_key : optional keys marked required for creation May 18, 2024
@breathingdust
Copy link
Member

The Upstream API requires one of ExpireTime or NoExpiry to be set however both attributes are specified as optional in the schema.

I believe this schema should support oneOf so this could be handled better in the provider.

@breathingdust breathingdust added bug upstream-aws Unable to proceed due to missing or broken functionality from an AWS dependency. and removed needs-triage labels May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug upstream-aws Unable to proceed due to missing or broken functionality from an AWS dependency.
Projects
None yet
Development

No branches or pull requests

2 participants