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

AppConfig Hosted Configuration Version does not return the right deployment version #3762

Open
1 task
kalos92 opened this issue Nov 4, 2024 · 0 comments
Open
1 task
Labels
bug Something isn't working new Un-triaged issue

Comments

@kalos92
Copy link

kalos92 commented Nov 4, 2024

Expected Behavior

the result should be 1.

Actual Behavior

application := appconfigapplication.NewAppconfigApplication(stack, jsii.String(project+"apc-application"+env), &appconfigapplication.AppconfigApplicationConfig{
		Name:        jsii.String(project + "application" + env),
		Description: jsii.String("Contains the configuration for mercury lambda"),
		Tags:        tags,
		TagsAll:     tags,
	})

	apcConfigProfile := appconfigconfigurationprofile.NewAppconfigConfigurationProfile(stack, jsii.String(project+"apc-configuration-profile"+env), &appconfigconfigurationprofile.AppconfigConfigurationProfileConfig{
		ApplicationId: application.Id(),
		LocationUri:   jsii.String("hosted"),
		Name:          jsii.String(project + "profile" + env),
		Description:   jsii.String("Configuration of mercury's notification"),
		Tags:          tags,
		TagsAll:       tags,
		Type:          jsii.String("AWS.Freeform"),
		Validator:     &[]*appconfigconfigurationprofile.AppconfigConfigurationProfileValidator{{Type: jsii.String("JSON_SCHEMA"), Content: jsii.String(string(bbytes))}},
	})

	apcConfigurationVersion := appconfighostedconfigurationversion.NewAppconfigHostedConfigurationVersion(stack, jsii.String(project+"apc-hosted-configuration"+env), &appconfighostedconfigurationversion.AppconfigHostedConfigurationVersionConfig{
		ApplicationId:          application.Id(),
		ConfigurationProfileId: apcConfigProfile.ConfigurationProfileId(),
		Content:                jsii.String(string(jbytes)),
		ContentType:            jsii.String("application/json"),
		Description:            jsii.String("Json configuration of what to send to the selected recipients"),
	})

	apcEnv := appconfigenvironment.NewAppconfigEnvironment(stack, jsii.String(project+"apc-environment"+env), &appconfigenvironment.AppconfigEnvironmentConfig{
		ApplicationId: application.Id(),
		Name:          jsii.String(project + "environment" + env),
		Description:   jsii.String("Current configuration of Mercury"),
		Tags:          tags,
	})

	appconfigdeployment.NewAppconfigDeployment(stack, jsii.String(project+"apc-deployment"+env), &appconfigdeployment.AppconfigDeploymentConfig{
		DependsOn:              &[]cdktf.ITerraformDependable{apcConfigurationVersion},
		ApplicationId:          application.Id(),
		ConfigurationProfileId: apcConfigProfile.ConfigurationProfileId(),
		ConfigurationVersion:   apcConfigurationVersion.GetVersionNumber(),
		DeploymentStrategyId:   jsii.String("AppConfig.AllAtOnce"),
		EnvironmentId:          apcEnv.EnvironmentId(),
		Description:            jsii.String("Deploy"),
		Tags:                   tags,
		TagsAll:                tags,
	})

I'm trying to deploy an AWS appconfig configuration, but when deploying the last resource appconfigdeployment is invalid because the ConfigurationVersion is -8.109562212591382e+298

If I try to print the ConfigDeploymentVersionID it gives me something like xxxxx\xxxxx\1 showing the right version. Obviously I am unable to parse the ID at runtime.

Steps to Reproduce

  1. Declare an AWS AppConfig application
  2. Declare an AWS AppConfig ConfigurationProfile
  3. Declare an AWS AppConfig ConfigurationVersion
  4. Declare an AWS AppConfig Environment
  5. Declare an AWS AppConfig Deployment

Versions

language: go
cdktf-cli: 0.20.9
node: v18.12.1
cdktf: 0.20.9
constructs: 10.4.2
jsii: 1.104.0
terraform: 1.9.8
arch: arm64
os: darwin 23.3.0
go: go version go1.23.2 darwin/arm64
providers
github.com/cdktf/cdktf-provider-aws-go/aws (PREBUILT)
terraform provider version: 5.73.0
prebuilt provider version: 19.39.0
cdktf version: ^0.20.0
github.com/cdktf/cdktf-provider-null-go/null (PREBUILT)
terraform provider version: 3.2.3
prebuilt provider version: 10.0.1
cdktf version: ^0.20.0

Providers

│ Provider Name │ Provider Version │ CDKTF │ Constraint │ Package Name │ Package Version │
├───────────────┼──────────────────┼─────────┼────────────┼──────────────────────────────────────────────┼─────────────────┤
│ aws │ 5.73.0 │ ^0.20.0 │ │ github.com/cdktf/cdktf-provider-aws-go/aws │ 19.39.0 │
├───────────────┼──────────────────┼─────────┼────────────┼──────────────────────────────────────────────┼─────────────────┤
│ null │ 3.2.3 │ ^0.20.0 │ │ github.com/cdktf/cdktf-provider-null-go/null │ 10.0.1 │

Gist

No response

Possible Solutions

No response

Workarounds

No response

Anything Else?

If I try to print the ConfigDeploymentVersionID it gives me something like xxxxx\xxxxx\1 showing the right version. Obviously I am unable to parse the ID at runtime.

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

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
@kalos92 kalos92 added bug Something isn't working new Un-triaged issue labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new Un-triaged issue
Projects
None yet
Development

No branches or pull requests

1 participant