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

Stale resource schema cache in repository #1018

Closed
kadrach opened this issue Jun 26, 2023 · 2 comments · Fixed by #1030
Closed

Stale resource schema cache in repository #1018

kadrach opened this issue Jun 26, 2023 · 2 comments · Fixed by #1030
Labels
code-generation Relates to the conversion of CloudFormation schema to Terraform schema at buildtime. upstream-aws Unable to proceed due to missing or broken functionality from an AWS dependency.

Comments

@kadrach
Copy link
Contributor

kadrach commented Jun 26, 2023

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

Affected Resource(s)

81 stale schemas committed to repository, affecting 14 resources that can successfully be updated (more below).

Expected Behavior

Provider is up to date using latest schemas from CFN registry.

Actual Behavior

Generation for the provider uses stale schemas. Many schemas committed to this repository (internal/service/cloudformation/schemas/) are outdated.

Steps to Reproduce

% rm -rf internal/service/cloudformation/schemas
% AWS_DEFAULT_REGION=us-east-1 make schemas
% git diff --shortstat
81 files changed, 34245 insertions(+), 1663 deletions(-)

The updated schemas introduce a new set of issues (two top-level Ids introduced likely require disabling existing resources?):

error generating Terraform awscc_appflow_connector_profile resource: emitting schema code: isSandboxEnvironment overwrites IsSandboxEnvironment for Terraform attribute 
error generating Terraform awscc_ec2_network_insights_analysis resource: emitting schema code: DestinationCidr overwrites destinationCidr for Terraform attribute destination_cidr
error generating Terraform awscc_eks_cluster resource: emitting schema code: top-level property Id is not a primary identifier
error generating Terraform awscc_quicksight_data_set resource: emitting schema code: RowLevelPermissionTagConfiguration/TagRuleConfigurations is of unsupported type: list of array
error generating Terraform awscc_rum_app_monitor resource: emitting schema code: top-level property Id is not a primary identifier
error generating Terraform awscc_stepfunctions_state_machine resource: emitting schema code: DefinitionSubstitutions is of unsupported type: key-value map of

Additionally AWS::Lex::Bot causes a stackoverflow.

These resources/data sources update successfully:

	modified:   internal/aws/cassandra/keyspace_resource_gen.go
	modified:   internal/aws/cassandra/keyspace_singular_data_source_gen.go
	modified:   internal/aws/connect/phone_number_resource_gen.go
	modified:   internal/aws/connect/phone_number_singular_data_source_gen.go
	modified:   internal/aws/dynamodb/global_table_resource_gen.go
	modified:   internal/aws/ec2/verified_access_instance_resource_gen.go
	modified:   internal/aws/ec2/verified_access_instance_singular_data_source_gen.go
	modified:   internal/aws/iotsitewise/asset_model_resource_gen.go
	modified:   internal/aws/kafkaconnect/connector_resource_gen.go
	modified:   internal/aws/kafkaconnect/connector_singular_data_source_gen.go
	modified:   internal/aws/mediaconnect/flow_resource_gen.go
	modified:   internal/aws/mediaconnect/flow_singular_data_source_gen.go
	modified:   internal/aws/mediaconnect/flow_source_resource_gen.go
	modified:   internal/aws/mediaconnect/flow_source_singular_data_source_gen.go
	modified:   internal/aws/networkmanager/transit_gateway_registration_resource_gen.go
	modified:   internal/aws/quicksight/analysis_resource_gen.go
	modified:   internal/aws/quicksight/analysis_singular_data_source_gen.go
	modified:   internal/aws/quicksight/dashboard_resource_gen.go
	modified:   internal/aws/quicksight/dashboard_singular_data_source_gen.go
	modified:   internal/aws/quicksight/template_resource_gen.go
	modified:   internal/aws/quicksight/template_singular_data_source_gen.go
	modified:   internal/aws/sagemaker/model_package_resource_gen.go
	modified:   internal/aws/sagemaker/model_package_singular_data_source_gen.go
	modified:   internal/aws/ssm/document_resource_gen.go

References

@ewbankkit ewbankkit added upstream-aws Unable to proceed due to missing or broken functionality from an AWS dependency. code-generation Relates to the conversion of CloudFormation schema to Terraform schema at buildtime. and removed needs-triage labels Jun 29, 2023
@ewbankkit
Copy link
Contributor

Additionally

  • AWS_QuickSight_Analysis.json
  • AWS_QuickSight_Dashboard.json
  • AWS_QuickSight_Template.json

cause the go1.20 compiler to report errors:

internal compiler error: NewBulk too big: nbit=29982 count=729981 nword=937 size=683992197

@kadrach
Copy link
Contributor Author

kadrach commented Jul 4, 2023

% wc -l internal/aws/quicksight/dashboard_resource_gen.go 
  382203 internal/aws/quicksight/dashboard_resource_gen.go

Fairly complex/large schema, and the emitter generates this as one giant map. golang/go#33437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-generation Relates to the conversion of CloudFormation schema to Terraform schema at buildtime. upstream-aws Unable to proceed due to missing or broken functionality from an AWS dependency.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants