Add env terraform/bicep settings schema#10832
Conversation
|
713613f to
2eebf49
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## features/terraform-bicep-settings #10832 +/- ##
=====================================================================
- Coverage 50.40% 50.40% -0.01%
=====================================================================
Files 664 666 +2
Lines 41277 41289 +12
=====================================================================
+ Hits 20807 20813 +6
- Misses 18497 18502 +5
- Partials 1973 1974 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: ytimocin <ytimocin@microsoft.com>
2eebf49 to
adf547e
Compare
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
| credentials?: Record<TerraformCredentialConfiguration>; | ||
| } |
There was a problem hiding this comment.
Looking at the design, should this also consist a key for url/hostname: Record<string, TerraformCredentialConfiguration>
credentials: [
<url>: {
secret: providerSecret.id
}
]
| #suppress "@azure-tools/typespec-azure-core/bad-record-type" | ||
| @doc("Terraform backend configuration matching the terraform block.") | ||
| model TerraformBackendConfiguration extends Record<unknown> { | ||
| @doc("Backend type (for example 'kubernetes').") | ||
| type: string; | ||
|
|
||
| @doc("Backend-specific configuration values.") | ||
| config?: Record<unknown>; | ||
| } |
There was a problem hiding this comment.
Do backend config values ever need to be anything other than strings? I think Terraform passes all backend settings as map[string]string, so we should tighten this to Record instead of an open map.
| provisioningState?: ProvisioningState; | ||
|
|
||
| @doc("Authentication settings for private registries.") | ||
| authentication?: BicepAuthenticationConfiguration; |
There was a problem hiding this comment.
Just to confirm - The example schema in design doc has it as "registryAuthentication".. did we decide to change it to "authentication"?
| // Providers specifies the Terraform provider configurations. Controls how Terraform interacts with cloud providers, SaaS providers, and other APIs: https://developer.hashicorp.com/terraform/language/providers/configuration.// Providers specifies the Terraform provider configurations. | ||
| Providers map[string][]ProviderConfigProperties `json:"providers,omitempty"` | ||
|
|
||
| // ProviderMirror specifies the Terraform provider mirror configuration. |
There was a problem hiding this comment.
Could you please add a link to relevant Terraform's docs here for reference?
| ModuleRegistries map[string]*TerraformModuleRegistryConfig `json:"moduleRegistries,omitempty"` | ||
|
|
||
| // Version specifies the Terraform binary version and the URL to download it from. | ||
| Version *TerraformVersionConfig `json:"version,omitempty"` |
There was a problem hiding this comment.
Should we rename it to be more explicit?
| Version *TerraformVersionConfig `json:"version,omitempty"` | |
| Version *TerraformBinaryConfig `json:"version,omitempty"` |
| type TerraformModuleRegistryConfig struct { | ||
| // URL is the URL of the module registry. | ||
| // Example: 'app.terraform.io' for Terraform Cloud or 'terraform.example.com' for Terraform Enterprise | ||
| URL string `json:"url,omitempty"` |
There was a problem hiding this comment.
Is this a fixed list of URLs or open ended?
| ProviderMappings map[string]string `json:"providerMappings,omitempty"` | ||
|
|
||
| // Authentication configuration for accessing private Terraform provider mirrors. | ||
| Authentication RegistryAuthConfig `json:"authentication,omitempty"` |
There was a problem hiding this comment.
Why is the provider mirror using the module registry auth? they are different protocols and potentially different hosts.
| // Authentication configuration for accessing private Terraform provider mirrors. | ||
| Authentication RegistryAuthConfig `json:"authentication,omitempty"` | ||
|
|
||
| // TLS configuration for connecting to the Terraform provider registry mirror or for downloading the filesystem mirror. |
There was a problem hiding this comment.
Terraform has module registries and provider mirrors, provider registry mirror is confusing.
| Authentication RegistryAuthConfig `json:"authentication,omitempty"` | ||
|
|
||
| // TLS configuration for connecting to the Terraform provider registry mirror or for downloading the filesystem mirror. | ||
| TLS *TLSConfig `json:"tls,omitempty"` |
There was a problem hiding this comment.
What is the scenario for TLS config here? In the situation where users have an internal CA we use an init container to add the internal CA certs to the Radius container root CA directory.
There was a problem hiding this comment.
We are not going to have init container anymore.
| type TLSConfig struct { | ||
| // CACertificate is a reference to a secret containing a custom CA certificate bundle to use for TLS verification. | ||
| // The secret must contain a key named 'ca-cert' with the PEM-encoded certificate bundle. | ||
| CACertificate *SecretReference `json:"caCertificate,omitempty"` |
There was a problem hiding this comment.
This must be done at the container level.
| } | ||
|
|
||
| // TerraformProviderInstallationConfiguration describes network mirror and direct rules. | ||
| type TerraformProviderInstallationConfiguration struct { |
There was a problem hiding this comment.
This looks like a Terraform Provider Mirror has been split into two abstractions; ProviderInstallation and NetworkMirror. Why?
| } | ||
|
|
||
| // TerraformDirectInstallationConfiguration controls direct installation rules. | ||
| type TerraformDirectConfiguration struct { |
There was a problem hiding this comment.
What is a direct installation?
|
could you please run make generate again? as I see fake clients for Bicep/Terraform settings are not generated : https://github.com/radius-project/radius/blob/9bdba6ff49102ed7dfd4ce78d0fe82b1886fccf4/pkg/corerp/api/v20250801preview/fake |
Description
Examples:
Type of change
Fixes: #issue_number
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: