-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
new resource azurerm_arc_kubernetes_provisioned_cluster
#28216
base: main
Are you sure you want to change the base?
Conversation
azurerm_arc_kubernetes_provisioned_cluster
azurerm_arc_kubernetes_provisioned_cluster_instance
azurerm_arc_kubernetes_provisioned_cluster_instance
azurerm_arc_kubernetes_provisioned_cluster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks good @teowa! Would you mind fixing up the two minor comments while the tests are running? Once that's done and the tests are green this should be good to go.
client := metadata.Client.ArcKubernetes.ArcKubernetesClient | ||
|
||
var model ArcKubernetesProvisionedClusterModel | ||
if err := metadata.Decode(&model); err != nil { | ||
return fmt.Errorf("decoding: %+v", err) | ||
} | ||
|
||
subscriptionId := metadata.Client.Account.SubscriptionId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be mindful of the ordering here
client := metadata.Client.ArcKubernetes.ArcKubernetesClient | |
var model ArcKubernetesProvisionedClusterModel | |
if err := metadata.Decode(&model); err != nil { | |
return fmt.Errorf("decoding: %+v", err) | |
} | |
subscriptionId := metadata.Client.Account.SubscriptionId | |
client := metadata.Client.ArcKubernetes.ArcKubernetesClient | |
subscriptionId := metadata.Client.Account.SubscriptionId | |
var model ArcKubernetesProvisionedClusterModel | |
if err := metadata.Decode(&model); err != nil { | |
return fmt.Errorf("decoding: %+v", err) | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
} | ||
|
||
payload := &arckubernetes.ConnectedCluster{ | ||
Identity: *expandedIdentity, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identity: *expandedIdentity, | |
Identity: pointer.To(expandedIdentity), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, this should be pointer.From(expandedIdentity)
|
||
func (r ArcKubernetesProvisionedClusterResource) Delete() sdk.ResourceFunc { | ||
return sdk.ResourceFunc{ | ||
Timeout: 30 * time.Minute, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to increase this since the tests fail with
------- Stdout: -------
=== RUN TestAccArcKubernetesProvisionedCluster_basic
=== PAUSE TestAccArcKubernetesProvisionedCluster_basic
=== CONT TestAccArcKubernetesProvisionedCluster_basic
testcase.go:173: Error running post-test destroy, there may be dangling resources: exit status 1
Error: deleting Connected Cluster (Subscription: "*******"
Resource Group Name: "acctestRG-akpc-241209123533880988"
Connected Cluster Name: "acctest-akpc-241209123533880988"): polling after ConnectedClusterDelete: context deadline exceeded
…m into arc_kubernetes_provisioned_cluster
Community Note
Description
supersede #26916
reference:
PR Checklist
For example: “
resource_name_here
- description of change e.g. adding propertynew_property_name_here
”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_arc_kubernetes_provisioned_cluster
This is a (please select all that apply):
Related Issue(s)
Fixes #0000
Note
If this PR changes meaningfully during the course of review please update the title and description as required.