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

#24103 : Support sku_tier argument as part of azurerm_spring_cloud_service #24107

Merged
merged 3 commits into from
Jan 4, 2024

Conversation

harshavmb
Copy link
Contributor

Support sku_tier argument as part of azurerm_spring_cloud_service resource.

Fixes #24103

Copy link

@dgensert dgensert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, this looks great but we need to also provision the reference to the app-container environment if we want to create those StandardGen2 Tiers, e.g.
image

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pr @harshavmb - looks like we have a test failure thou:

------- Stdout: -------
=== RUN   TestAccSpringCloudService_containerRegistry
=== PAUSE TestAccSpringCloudService_containerRegistry
=== CONT  TestAccSpringCloudService_containerRegistry
    testcase.go:113: Step 1/4 error: Error running apply: exit status 1
        
        Error: creating Spring Cloud Service: (Spring Name "acctest-sc-231206075149083916" / Resource Group "acctestRG-spring-231206075149083916"): appplatform.ServicesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="BadArgument" Message="Invalid arguments: The field Name is invalid." Details=[{"code":"BadArgument","details":null,"message":"The field Name is invalid.","target":"Sku.Name"},{"code":"BadArgument","details":null,"message":"The field Tier is invalid.","target":"Sku.Tier"}]
        
          with azurerm_spring_cloud_service.test,
          on terraform_plugin_test.tf line 42, in resource "azurerm_spring_cloud_service" "test":
          42: resource "azurerm_spring_cloud_service" "test" {
        
--- FAIL: TestAccSpringCloudService_containerRegistry (132.11s)

@harshavmb
Copy link
Contributor Author

Hi @katbyte ,

I see the reason for test failure is not setting sku_tier to Enterprise for E0. It is defaulted to Standard & the same is passed to API. The test case could be fixed by explicitly adding this argument but that would break & force the existing users to specify it for non Standard sku tiers.

I'll try to embed some logic to add it only when sku_tier is passed by end users in tandem with sku_name.

@harshavmb
Copy link
Contributor Author

Hi @dgensert ,

Indeed it was an oversight. I'll try adding container_environment_id & setting sku_tier accordingly.

@github-actions github-actions bot added size/S and removed size/XS labels Dec 13, 2023
Copy link

@dgensert dgensert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@dgensert
Copy link

dgensert commented Jan 3, 2024

@katbyte anything else blocking this?

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope just delayed due to the holidays, looks good not! thanks 🧮

@katbyte katbyte merged commit 9168fa4 into hashicorp:main Jan 4, 2024
25 checks passed
@github-actions github-actions bot added this to the v3.86.0 milestone Jan 4, 2024
@harshavmb harshavmb deleted the github-24103 branch January 4, 2024 05:50
Copy link

github-actions bot commented May 1, 2024

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for azurerm_spring_cloud_service tier=StandardGen2
3 participants