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

Improve setting of Unknown values in State after Create/Update to support "complex types" #331

Merged
merged 4 commits into from
Jan 4, 2022

Conversation

ewbankkit
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment 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 pull request followers and do not help prioritize the request
  • 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.

Closes #330.
Closes #266.

The previous implementation of setting Unknown values after Create or Update only worked for primitive types.
We can reuse the functionality in CopyValueAtPath, used for copying over write-only attributes during Read, to copy values of arbitrary type.

@ewbankkit ewbankkit marked this pull request as ready for review December 17, 2021 19:50
@ewbankkit
Copy link
Contributor Author

% terraform apply

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # awscc_location_place_index.name will be created
  + resource "awscc_location_place_index" "name" {
      + arn                       = (known after apply)
      + create_time               = (known after apply)
      + data_source               = "Esri"
      + data_source_configuration = {
        + intended_use = (known after apply)
      }
      + description               = (known after apply)
      + id                        = (known after apply)
      + index_arn                 = (known after apply)
      + index_name                = "location-service-1"
      + pricing_plan              = "RequestBasedUsage"
      + update_time               = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

awscc_location_place_index.name: Creating...
awscc_location_place_index.name: Creation complete after 7s [id=location-service-1]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

@ewbankkit ewbankkit merged commit 7c3314c into main Jan 4, 2022
@ewbankkit ewbankkit deleted the b-better-setting-of-unknowns branch January 4, 2022 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant