ibm.IamUserSettings
Explore with Pulumi AI
Provides a resource for IAM User Settings. The IP addresses configured here are the only ones from which a particuler user can log in to IBM Cloud. For more information, about IAM user settings, see allowing specific IP addresses.
Example Usage
Configuring allowed_ip list for a particular user
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const userSetting = new ibm.IamUserSettings("userSetting", {
allowedIpAddresses: [
"192.168.0.2",
"192.168.0.3",
"192.168.0.4",
],
iamId: "example@in.ibm.com",
});
import pulumi
import pulumi_ibm as ibm
user_setting = ibm.IamUserSettings("userSetting",
allowed_ip_addresses=[
"192.168.0.2",
"192.168.0.3",
"192.168.0.4",
],
iam_id="example@in.ibm.com")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ibm.NewIamUserSettings(ctx, "userSetting", &ibm.IamUserSettingsArgs{
AllowedIpAddresses: pulumi.StringArray{
pulumi.String("192.168.0.2"),
pulumi.String("192.168.0.3"),
pulumi.String("192.168.0.4"),
},
IamId: pulumi.String("example@in.ibm.com"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;
return await Deployment.RunAsync(() =>
{
var userSetting = new Ibm.IamUserSettings("userSetting", new()
{
AllowedIpAddresses = new[]
{
"192.168.0.2",
"192.168.0.3",
"192.168.0.4",
},
IamId = "example@in.ibm.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IamUserSettings;
import com.pulumi.ibm.IamUserSettingsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var userSetting = new IamUserSettings("userSetting", IamUserSettingsArgs.builder()
.allowedIpAddresses(
"192.168.0.2",
"192.168.0.3",
"192.168.0.4")
.iamId("example@in.ibm.com")
.build());
}
}
resources:
userSetting:
type: ibm:IamUserSettings
properties:
allowedIpAddresses:
- 192.168.0.2
- 192.168.0.3
- 192.168.0.4
iamId: example@in.ibm.com
Create IamUserSettings Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new IamUserSettings(name: string, args: IamUserSettingsArgs, opts?: CustomResourceOptions);
@overload
def IamUserSettings(resource_name: str,
args: IamUserSettingsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def IamUserSettings(resource_name: str,
opts: Optional[ResourceOptions] = None,
iam_id: Optional[str] = None,
allowed_ip_addresses: Optional[Sequence[str]] = None,
iam_user_settings_id: Optional[str] = None)
func NewIamUserSettings(ctx *Context, name string, args IamUserSettingsArgs, opts ...ResourceOption) (*IamUserSettings, error)
public IamUserSettings(string name, IamUserSettingsArgs args, CustomResourceOptions? opts = null)
public IamUserSettings(String name, IamUserSettingsArgs args)
public IamUserSettings(String name, IamUserSettingsArgs args, CustomResourceOptions options)
type: ibm:IamUserSettings
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args IamUserSettingsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args IamUserSettingsArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args IamUserSettingsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IamUserSettingsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args IamUserSettingsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var iamUserSettingsResource = new Ibm.IamUserSettings("iamUserSettingsResource", new()
{
IamId = "string",
AllowedIpAddresses = new[]
{
"string",
},
IamUserSettingsId = "string",
});
example, err := ibm.NewIamUserSettings(ctx, "iamUserSettingsResource", &ibm.IamUserSettingsArgs{
IamId: pulumi.String("string"),
AllowedIpAddresses: pulumi.StringArray{
pulumi.String("string"),
},
IamUserSettingsId: pulumi.String("string"),
})
var iamUserSettingsResource = new IamUserSettings("iamUserSettingsResource", IamUserSettingsArgs.builder()
.iamId("string")
.allowedIpAddresses("string")
.iamUserSettingsId("string")
.build());
iam_user_settings_resource = ibm.IamUserSettings("iamUserSettingsResource",
iam_id="string",
allowed_ip_addresses=["string"],
iam_user_settings_id="string")
const iamUserSettingsResource = new ibm.IamUserSettings("iamUserSettingsResource", {
iamId: "string",
allowedIpAddresses: ["string"],
iamUserSettingsId: "string",
});
type: ibm:IamUserSettings
properties:
allowedIpAddresses:
- string
iamId: string
iamUserSettingsId: string
IamUserSettings Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The IamUserSettings resource accepts the following input properties:
- Iam
Id string - The users IAM or Email ID.
- Allowed
Ip List<string>Addresses - Lists the IP addresses in common separated format.
- Iam
User stringSettings Id - (String) The unique identifier of the IAM user setting as
account_id/iam_id
.
- Iam
Id string - The users IAM or Email ID.
- Allowed
Ip []stringAddresses - Lists the IP addresses in common separated format.
- Iam
User stringSettings Id - (String) The unique identifier of the IAM user setting as
account_id/iam_id
.
- iam
Id String - The users IAM or Email ID.
- allowed
Ip List<String>Addresses - Lists the IP addresses in common separated format.
- iam
User StringSettings Id - (String) The unique identifier of the IAM user setting as
account_id/iam_id
.
- iam
Id string - The users IAM or Email ID.
- allowed
Ip string[]Addresses - Lists the IP addresses in common separated format.
- iam
User stringSettings Id - (String) The unique identifier of the IAM user setting as
account_id/iam_id
.
- iam_
id str - The users IAM or Email ID.
- allowed_
ip_ Sequence[str]addresses - Lists the IP addresses in common separated format.
- iam_
user_ strsettings_ id - (String) The unique identifier of the IAM user setting as
account_id/iam_id
.
- iam
Id String - The users IAM or Email ID.
- allowed
Ip List<String>Addresses - Lists the IP addresses in common separated format.
- iam
User StringSettings Id - (String) The unique identifier of the IAM user setting as
account_id/iam_id
.
Outputs
All input properties are implicitly available as output properties. Additionally, the IamUserSettings resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing IamUserSettings Resource
Get an existing IamUserSettings resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: IamUserSettingsState, opts?: CustomResourceOptions): IamUserSettings
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allowed_ip_addresses: Optional[Sequence[str]] = None,
iam_id: Optional[str] = None,
iam_user_settings_id: Optional[str] = None) -> IamUserSettings
func GetIamUserSettings(ctx *Context, name string, id IDInput, state *IamUserSettingsState, opts ...ResourceOption) (*IamUserSettings, error)
public static IamUserSettings Get(string name, Input<string> id, IamUserSettingsState? state, CustomResourceOptions? opts = null)
public static IamUserSettings get(String name, Output<String> id, IamUserSettingsState state, CustomResourceOptions options)
resources: _: type: ibm:IamUserSettings get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Allowed
Ip List<string>Addresses - Lists the IP addresses in common separated format.
- Iam
Id string - The users IAM or Email ID.
- Iam
User stringSettings Id - (String) The unique identifier of the IAM user setting as
account_id/iam_id
.
- Allowed
Ip []stringAddresses - Lists the IP addresses in common separated format.
- Iam
Id string - The users IAM or Email ID.
- Iam
User stringSettings Id - (String) The unique identifier of the IAM user setting as
account_id/iam_id
.
- allowed
Ip List<String>Addresses - Lists the IP addresses in common separated format.
- iam
Id String - The users IAM or Email ID.
- iam
User StringSettings Id - (String) The unique identifier of the IAM user setting as
account_id/iam_id
.
- allowed
Ip string[]Addresses - Lists the IP addresses in common separated format.
- iam
Id string - The users IAM or Email ID.
- iam
User stringSettings Id - (String) The unique identifier of the IAM user setting as
account_id/iam_id
.
- allowed_
ip_ Sequence[str]addresses - Lists the IP addresses in common separated format.
- iam_
id str - The users IAM or Email ID.
- iam_
user_ strsettings_ id - (String) The unique identifier of the IAM user setting as
account_id/iam_id
.
- allowed
Ip List<String>Addresses - Lists the IP addresses in common separated format.
- iam
Id String - The users IAM or Email ID.
- iam
User StringSettings Id - (String) The unique identifier of the IAM user setting as
account_id/iam_id
.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibm
Terraform Provider.