-
Notifications
You must be signed in to change notification settings - Fork 75
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
Configure BastionHost.network resource and add example manifest #775
Conversation
/test-examples="examples/network/v1beta1/bastionhost.yaml" |
config/externalname.go
Outdated
@@ -655,6 +655,8 @@ var TerraformPluginSDKExternalNameConfigs = map[string]config.ExternalName{ | |||
"azurerm_web_application_firewall_policy": config.TemplatedStringAsIdentifier("name", "/subscriptions/{{ .setup.configuration.subscription_id }}/resourceGroups/{{ .parameters.resource_group_name }}/providers/Microsoft.Network/applicationGatewayWebApplicationFirewallPolicies/{{ .external_name }}"), | |||
// /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Network/vpnServerConfigurations/serverConfiguration1/configurationPolicyGroups/configurationPolicyGroup1 | |||
"azurerm_vpn_server_configuration_policy_group": config.TemplatedStringAsIdentifier("name", "{{ .parameters.vpn_server_configuration_id }}/configurationPolicyGroups/{{ .external_name }}"), | |||
// /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/bastionHosts/instance1 | |||
"azurerm_bastion_host": config.IdentifierFromProvider, |
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.
When we set the external name configuration to the following, the update fails in the first reconcile:
"azurerm_bastion_host": config.TemplatedStringAsIdentifier("name", "/subscriptions/{{ .setup.configuration.subscription_id }}/resourceGroups/{{ .parameters.resource_group_name }}/providers/Microsoft.Network/bastionHosts/{{ .exteranl_name }}"),
Got the following error:
message: 'async update failed: refuse to update the external resource because
the following update requires replacing it: cannot change the value of the argument
"name" from "fatihtest" to "/subscriptions/038f2b7c-3265-43b8-8624-c9ad5da610a8/resourceGroups/fatihtest/providers/Microsoft.Network/bastionHosts/fatihtest"'
Therefore it is set to IdentifierFromProvider
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.
{{ .exteranl_name }}
was there a typo?
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.
Good catch, @ytsarev; in case of a typo, I expect the resource not to be created. I will try and update. Thank you
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.
Fixing the typo eliminated the issue 🤔 I updated the description and PR.
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.
Cool, thanks a lot!
Signed-off-by: Fatih Türken <turkenf@gmail.com>
/test-examples="examples/network/v1beta1/bastionhost.yaml" |
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.
Thanks @turkenf 🙌 LGTM.
Description of your changes
This PR includes configuring the
BastionHost.network
resource and adding the example manifest.I have:
make reviewable
to ensure this PR is ready for review.Addedbackport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
Manually and uptest: https://github.com/crossplane-contrib/provider-upjet-azure/actions/runs/9779701746