Skip to content

Commit

Permalink
remove provider specific attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonpet committed Feb 6, 2025
1 parent 4526b9e commit 970bcfd
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 56 deletions.
20 changes: 10 additions & 10 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "go.mod|go.sum|.*.map|^.secrets.baseline$",
"lines": null
},
"generated_at": "2025-01-29T01:12:34Z",
"generated_at": "2025-02-06T19:26:40Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -478,15 +478,15 @@
"hashed_secret": "dc61ac50e6f36d09340d8ca062da1f0d4215004f",
"is_secret": false,
"is_verified": false,
"line_number": 220,
"line_number": 199,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "470851178a9e3a16c35bc88232c21d04c555e5ca",
"is_secret": false,
"is_verified": false,
"line_number": 292,
"line_number": 271,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -872,39 +872,39 @@
"hashed_secret": "c427f185ddcb2440be9b77c8e45f1cd487a2e790",
"is_secret": false,
"is_verified": false,
"line_number": 1551,
"line_number": 1548,
"type": "Base64 High Entropy String",
"verified_result": null
},
{
"hashed_secret": "1f7e33de15e22de9d2eaf502df284ed25ca40018",
"is_secret": false,
"is_verified": false,
"line_number": 1618,
"line_number": 1615,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "1f614c2eb6b3da22d89bd1b9fd47d7cb7c8fc670",
"is_secret": false,
"is_verified": false,
"line_number": 3666,
"line_number": 3659,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "7abfce65b8504403afc25c9790f358d513dfbcc6",
"is_secret": false,
"is_verified": false,
"line_number": 3679,
"line_number": 3672,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "0c2d85bf9a9b1579b16f220a4ea8c3d62b2e24b1",
"is_secret": false,
"is_verified": false,
"line_number": 3720,
"line_number": 3713,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down Expand Up @@ -942,15 +942,15 @@
"hashed_secret": "c8b6f5ef11b9223ac35a5663975a466ebe7ebba9",
"is_secret": false,
"is_verified": false,
"line_number": 2377,
"line_number": 2370,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "8abf4899c01104241510ba87685ad4de76b0c437",
"is_secret": false,
"is_verified": false,
"line_number": 2383,
"line_number": 2376,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down
21 changes: 0 additions & 21 deletions examples/ibm-code-engine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,6 @@ $ terraform apply

Run `terraform destroy` when you don't need these resources.

## Versioning

If you want to use a specific version of Code Engine, you can do so using the `code_engine_version` argument in the IBM Cloud provider block. For example:

```hcl
provider "ibm" {
code_engine_version = var.code_engine_version
}
variable "code_engine_version" {
description = "The Code Engine date-based version string in the format 'YYYY-MM-DD'."
type = string
}
```
Create a terraform.tfvars file and specify the date-based version string in that file:

```hcl
code_engine_version = "2022-12-09"
```
When the API is updated with any breaking changes, the service introduces a new version date for the API. The API uses the most recent version on or before the date you specify. By default, if you do not specify a version, the latest version is used by the provider. You can find the available versions in the [API changelog](https://cloud.ibm.com/docs/codeengine?topic=codeengine-api-changelog#active-version-dates).

## Code Engine resources

### Resource: ibm_code_engine_project
Expand Down
5 changes: 2 additions & 3 deletions examples/ibm-code-engine/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
provider "ibm" {
ibmcloud_api_key = var.ibmcloud_api_key
region = var.ibmcloud_region
code_engine_version = var.code_engine_version
ibmcloud_api_key = var.ibmcloud_api_key
region = var.ibmcloud_region
}

terraform {
Expand Down
6 changes: 0 additions & 6 deletions examples/ibm-code-engine/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ variable "ibmcloud_region" {
type = string
}

variable "code_engine_version" {
description = "The Code Engine date-based version string in the format 'YYYY-MM-DD'."
type = string
default = "2025-01-10"
}

// Resource arguments for code_engine_project
variable "code_engine_project_name" {
description = "The name of the project."
Expand Down
9 changes: 1 addition & 8 deletions ibm/conns/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,6 @@ type Config struct {
// Constant Retry Delay for API calls
RetryDelay time.Duration

// Code Engine date-based version
CodeEngineVersion string

// FunctionNameSpace ...
FunctionNameSpace string

Expand Down Expand Up @@ -3593,14 +3590,10 @@ func (c *Config) ClientSession() (interface{}, error) {
if fileMap != nil && c.Visibility != "public-and-private" {
codeEngineEndpoint = fileFallBack(fileMap, c.Visibility, "IBMCLOUD_CODE_ENGINE_API_ENDPOINT", c.Region, codeEngineEndpoint)
}
ceVersion := "2025-01-10"
if c.CodeEngineVersion != "" {
ceVersion = c.CodeEngineVersion
}
codeEngineClientOptions := &codeengine.CodeEngineV2Options{
Authenticator: authenticator,
URL: EnvFallBack([]string{"IBMCLOUD_CODE_ENGINE_API_ENDPOINT"}, codeEngineEndpoint),
Version: &ceVersion,
Version: core.StringPtr("2025-01-10"),
}

// Construct the service client.
Expand Down
8 changes: 0 additions & 8 deletions ibm/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,6 @@ func Provider() *schema.Provider {
Description: "The retry count to set for API calls.",
DefaultFunc: schema.EnvDefaultFunc("MAX_RETRIES", 10),
},
"code_engine_version": {
Type: schema.TypeString,
Optional: true,
Description: "The Code Engine date-based version string in the format 'YYYY-MM-DD'.",
DefaultFunc: schema.EnvDefaultFunc("CODE_ENGINE_VERSION", nil),
},
"function_namespace": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -2360,7 +2354,6 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
region := d.Get("region").(string)
zone := d.Get("zone").(string)
retryCount := d.Get("max_retries").(int)
ceVersion := d.Get("code_engine_version").(string)
wskNameSpace := d.Get("function_namespace").(string)
riaasEndPoint := d.Get("riaas_endpoint").(string)

Expand All @@ -2384,7 +2377,6 @@ func providerConfigure(d *schema.ResourceData) (interface{}, error) {
RetryCount: retryCount,
SoftLayerEndpointURL: softlayerEndpointUrl,
RetryDelay: conns.RetryAPIDelay,
CodeEngineVersion: ceVersion,
FunctionNameSpace: wskNameSpace,
RiaasEndPoint: riaasEndPoint,
IAMToken: iamToken,
Expand Down

0 comments on commit 970bcfd

Please sign in to comment.