jolly-journalist-76169
02/17/2023, 9:25 PMGoogle Storage
). What am I doing now?
1. I use the module "npm googleapis" where I log in via OAuth2 to GCP
and get the accessToken - I have it stored under the variable.
2. I would like to use my accessToken in Pulumi to hold the state in GS.
I have read about setting the accessToken
(https://www.pulumi.com/registry/packages/gcp/installation-configuration/#configuration-reference; pulumi config set gcp:accessToken
), but all attempts end up forcing me to log into Pulumi Service
- and I would like to avoid that.
Actually, the matter would be solved if someone would show me how to use the pulumi login gs://
command and pass my accessToken in it.
I hope there will be someone here with knowledge!white-forest-65475
02/19/2023, 5:24 PMauto.LocalWorkstation
, why am I getting errors about not having set PULUMI_ACCESS_TOKEN? How should I tell the automation SDK to please use a locally managed service backend for this stack?
Here’s a small snippet I think is relevant:
def get_stack(env: str, stack_name: Optional[str]) -> auto.Stack:
if not stack_name:
stack_name = env
if env == "minikube":
from .minikube import build_minikube
program = build_minikube
else:
raise ValueError("Unknown environment: %s", env)
workdir = PULUMI_WORKDIR / 'stack_name'
if not workdir.exists():
workdir.mkdir()
# TODO provide secrets, etc. here
workspace = auto.LocalWorkspace(work_dir=str(workdir), program=program)
try:
stack = workspace.select_stack(stack_name)
except auto.CommandError:
stack = workspace.create_stack(stack_name)
assert stack is not None
return stack
white-forest-65475
02/19/2023, 5:28 PMPulumi.yaml
-file project definition, so that I can specify that certain target environments need to use a different PulumiFn? Then I can abandon using the automation API entirely and just use the pulumi
CLI.rhythmic-receptionist-62263
02/20/2023, 12:52 AMenough-painter-7423
02/20/2023, 7:58 AMhallowed-room-5599
02/20/2023, 12:09 PMkubeconfig_path = pulumi.Output.all(cluster_kubeconfig, cluster.name).apply(lambda args: update_kubeconfig(*args))
pulumi.export("kubeconfigPath", kubeconfig_path)
kubeconfig_path shows as [secret] while it's clearly not.curved-toddler-79704
02/20/2023, 2:46 PMpulumi-azure-native
for python3.7 and it get stuck for a long time. how can I install it anyway?hallowed-room-5599
02/21/2023, 2:16 PMdefaul_pool = container.NodePool(
"default-pool",
# REQUIRES CLUSTER NAME
location="europe-central2-a",
autoscaling={..}
..
)
cluster = container.Cluster(
"mycluster",
location="europe-central2-a",
node_pools=[default_pool],
..
)
wonderful-nail-34709
02/22/2023, 11:13 AMbest-dog-72192
02/22/2023, 5:04 PMbetter-park-30599
02/22/2023, 9:52 PMgorgeous-park-91773
02/23/2023, 12:58 PMbright-painter-61403
02/24/2023, 3:21 AMbumpy-kitchen-55440
02/24/2023, 1:26 PMbusy-magician-53063
02/24/2023, 4:05 PMpolite-umbrella-11196
02/26/2023, 2:17 AMicy-controller-6092
02/27/2023, 2:06 AMhallowed-room-5599
02/27/2023, 1:03 PMgcloud
but I'm lost and can't find much examples.
With the code below I get error: unrecognized resource type (Check): gcp:myaccount:Cluster
class MyCluster(pulumi.CustomResource):
def __init__(self, name, opts=None):
super().__init__("gcp:myaccount:Cluster", name, {}, opts)
def create(self):
# TODO: Call gcloud directly to create cluster
super().create()
def delete(self):
# TODO: Call gcloud directly to kill cluster
super().delete()
cluster = MyCluster("mycluster")
What is *:**:**
supposed to be?rhythmic-receptionist-62263
02/28/2023, 6:42 PM/home/user1/code/user1-pulumi-testing/venv/bin/python -m pip list -v --format json
/home/user1/code/user1-pulumi-testing/venv/bin/python: No module named pip
I'm not sure how to try and get this sorted.broad-holiday-50009
02/28/2023, 10:13 PMicy-laptop-27867
03/01/2023, 1:35 PM*.cpu
and *.mem
files when running pulumi up --profiling ..
?some-grass-63999
03/03/2023, 8:00 PMmagnificent-city-85763
03/07/2023, 3:48 PMbusy-magician-53063
03/07/2023, 4:07 PMrepository = awsx.ecr.Respository(...)
image = awsx.ecr.Image(
"scheduler",
path="../",
dockerfile="scheduler/Dockerfile",
extra_options={
"-t",
"1.0.0"
},
args={
...
},
)
This implementation does, but is inconsistent and uses Pulumi-docker. I’m currently getting bugs fairly frequently trying to build and push this way, so Crosswalk would be preferable as it was very consistent (just didn’t tag).
repository = awsx.ecr.Respository(...)
image = docker.Image(
name="scheduler",
image_name=repository.url.apply(lambda url: f"{url}:{scheduler_version}"),
build=docker.DockerBuild(
context="../", # type: ignore
dockerfile="scheduler/Dockerfile", # type: ignore
args={
...
}
),
registry=None,
)
Is there a way I’m not seeing to tag using AWSx?acceptable-lawyer-72941
03/07/2023, 10:41 PMfamous-battery-82719
03/08/2023, 1:06 AMstraight-fireman-55591
03/08/2023, 4:50 PMPreviewing update (dev):
error: could not load plugin for gcp provider 'urn:pulumi:dev::xxxx::pulumi:providers:gcp::default': Could not automatically download and install resource plugin 'pulumi-resource-gcp', install the plugin using `pulumi plugin install resource gcp`.
Underlying error: 401 HTTP error fetching plugin from <https://api.github.com/repos/pulumi/pulumi-gcp/releases/latest>
If I add pulumi plugin install resource gcp
I get: error: 401 HTTP error fetching plugin from <https://api.github.com/repos/pulumi/pulumi-gcp/releases/latest>
default:
image: pulumi/pulumi:latest
stages:
- deploy-preview
- deploy-update
deploy-preview:
stage: deploy-preview
rules:
- if: $CI_COMMIT_BANCH == "dev"
- if: $CI_PIPELINE_SOURCE == "push"
when: always
script:
- export PULUMI_CONFIG_PASSPHRASE=""
- pulumi login <gs://xxxxxxxxxx>
- pulumi stack select ${CI_COMMIT_BRANCH}
- pulumi config set gcp:project xxxxxxxxxx
- pulumi config set gcp:region xxxxxxxxxx
- pulumi preview
deploy-update:
stage: deploy-update
rules:
- if: $CI_COMMIT_BANCH == "dev"
- if: $CI_PIPELINE_SOURCE == "push"
when: manual
script:
- export PULUMI_CONFIG_PASSPHRASE=""
- pulumi login <gs://xxxxxxxxxx>
- pulumi stack select ${CI_COMMIT_BRANCH}
- pulumi config set gcp:project xxxxxxxxxx
- pulumi config set gcp:region xxxxxxxxxx
- pulumi update --yes
straight-fireman-55591
03/08/2023, 4:51 PMbumpy-area-31683
03/08/2023, 7:39 PMp_vm_nic[vnet][subnet] = azure_native.network.NetworkInterface(p_nic_name,
enable_accelerated_networking=True,
network_security_group = azure_native.network.NetworkSecurityGroupArgs(id=nsg_out[vnet].id),
location=location,
network_interface_name=p_nic_name,
resource_group_name=rg_out.name,
ip_configurations = [azure_native.network.NetworkInterfaceIPConfigurationArgs(name=p_nic_name, public_ip_address=azure_native.network.PublicIPAddressArgs(id=p_public_ip[vnet][subnet].id), subnet=azure_native.network.SubnetArgs(id=subnet_out[vnet][subnet].id), private_ip_allocation_method="Dynamic")]
)
I tried several things along this line, no luck. Any help is appreciated. Thanks in advance.
private_ip = p_vm_nic[vnet][subnet].ip_configurations.apply(lambda ip_configurations: ip_configurations[0]['private_ip_address'])
billions-piano-69192
03/08/2023, 8:57 PMpreview
in a merge request pipeline.I have followed the docs and have a sucessful 200 response when running gitlab's test here: I also created a very small sucessful test case where I use pulumi's cli rather than the automation tools: I believe I am missing something with respect to setting up a preview through pulumi.automation
. The preview itself is sucessful, but the webhook does not fire to produce the preview on gitlab ui. Can someone point me in the right direction?